Mostrando entradas con la etiqueta Sistemas Distribuidos y Paralelos. Mostrar todas las entradas
Mostrando entradas con la etiqueta Sistemas Distribuidos y Paralelos. Mostrar todas las entradas

11 de mayo de 2012

Week 16

Distributed and Parallel Systems
Contribution: Week 16
Para esta semana no se me ocurría que hacer, así que como nunca leí ni investigue nada sobre lo que era CUDA, y como nunca es tarde para hacerlo fue lo que hice para esta semana.

Enlace al wiki: About CUDA

24 de abril de 2012

Week 15

Distributed and Parallel Systems
Contribution: Week 15
Para esta semana que toca ver el tema del Grid Computing busqué cuales son los usos que se le dan a nivel empresarial o de investigación científica por parte de organizaciones que dedican su estudio a ambientes que incluyen gran cantidad de variables y procesamiento.

También información de como un Grid comparte recursos entre los componentes del mismo.

Enlace al wiki: How a Grid Works

Nominaciones
Cecilia Urbina
Gabriela García
Roberto Martínez

18 de abril de 2012

Week 14

Distributed and Parallel Systems
Contribution: Week 14
Para no dejar sin nada en esta semana puse solo información de varios sitios y una página donde muestran el rendimiento de varios procesadores para computadora, es una lista demasiado completa de variedad de procesadores y esta totalmente actualizada, deje una captura de los que se encuentran en el mejor lugar el día de hoy.

La próxima semana, dependiendo de que se hable hoy para la aplicación que se tomará para prueba del cluster, hablaré de eso ya sea algo de rendering, weather forecasting, o cualquier otra cosa.

Enlace al wiki: Benchmark Info


11 de abril de 2012

Extra Points 3

Distributed and Parallel Systems
Extra Points 3
  • Accelerate: Begin to move more quickly.
  • Forecast: A prediction or estimate, especially of the weather or a financial trend.
  • Brain: An organ of soft nervous tissue contained in the skull, functioning as the coordinating centre of sensation and intellectual and nervous activity. Intellectual capacity. Informal a clever person who is the main organizer within a group.
  • Optimization: Make the best or most effective use of a situation or resource.
  • Download: Copy data from one computer system to another or to a disk.

10 de abril de 2012

Week 13

Distributed and Parallel Systems
Contribution: Week 13
Esta semana deje un poco de lado lo de el WRF para predicción del clima, ya que hay cosas que vi en el tutorial que necesito investigar antes de continuar, pero lo haré para la próxima semana.

Para esta semana esta en el wiki agregué información sobre el monitoreo de un cluster con interfaz gráfica, que sin duda es de gran ayuda para saber y tener idea de lo que pasa con los nodos y como se están ejecutando los procesos en ellos. La herramienta es para un cluster creado con Open Mosix del que ya se había mencionado un poco de él en otra página del wiki, y cree una página nueva para esta aportación.

Enlace al wiki: Monitoreo Open Mosix

Nominaciones
Cecilia Urbina - Por su aportación con la herramienta iPy para cómputo paralelo.

9 de abril de 2012

Week 12

Distributed and Parallel Systems
Contribution: Week 12
Buscando en varios sitios de internet, encontré tutoriales para la instalación de la herramienta de The Weather Research and Forecasting Model, hay mucho material disponible para seguir instrucciones de instalación de esta herramienta, se cuenta con guía de usuario, y otras cosas más que vale la pena ver.

Para esta semana esta en el wiki escribo de los primeros pasos con esta herramienta, ya entrando en el procedimiento para la instalación.

Enlace al wiki: WRF

Nominaciones
Cecilia Urbina
Carmen Suárez
Gabriela García

8 de abril de 2012

Extra Points 2

Distributed and Parallel Systems
Extra Points 2
  • Equal: Identical in size, quantity, degree, intensity. The same.
  • Complexity: Expresses a condition of numerous elements in a system and numerous forms of relationships among the elements.
  • Output: Is the term denoting either an exit or changes which exit a system and which modify a process.
  • Atomic: A part or particle considered to be an irreducible constituent of a specified system.
  • Group: Any collection or assemblage of persons or things.

7 de abril de 2012

Week 11

Distributed and Parallel Systems
Contribution: Week 11
Continuando con lo que estuve investigando la semana pasada acerca del modelo WRF para predicción del tiempo atmosférico y el clima, y cuya información se encuentra en la misma publicación pasada, ahora complemento directamente en el wiki la página donde ya había mencionado anteriormente la idea para proyecto de grupo. Anteriormente solo había escrito algo de información, algunas herramientas e instituciones que se encargan de este tipo de cosas, y ahora incluye ahí mismo un apartado para esta herramienta que encontré.

Ahí mismo están los enlaces a la página oficial y la parte del tutorial que encontré, que espero seguir poco a poco y ver si logro instalar bien todas las herramientas.

Enlace al wiki: Clima (Modified)

6 de abril de 2012

Extra Points

Distributed and Parallel Systems
Extra Points
Questions and answers of the midterm exam.

The questions 1 to 5 are in Cecilia Urbina's blog.

6. How do the computers that form a cluster communicate with one another?
A cluster is communicated by a network connection. There are some types, for example the Ethernet is very common to communicate computers in a cluster, and can use protocols like TCP/IP or sometimes UDP. Another connection used in supercomputers is the Myrinet that use optical fiber cables.

7. What difficulties may arise if the machines that form a cluster are not all identical?
The difference in the architecture and also the resource that are available in the computer, because the execution of one thread can be different if the processor is slower than another, and delay all the execution.

8. What factors affect the number of threads that can be efficiently executed on a GPU?
The number of the processors and how many cores they have, and the memory that can be accessed.

9. Will a cluster always improve its performance if more machines are included into it?
No, because there is a point when you add more hardware and the performance stays equal.

10. Give an example of a critical section in a parallel algorithm.
When access a part of the memory that is used by another thread.

11. Why is deadlock harder to detect in a distributed system than in a single-machine system.
Because is difficult to know in what computer and which processor is the thread doing a deadlock.

12. Give an example of how, in general terms, to distribute sorting.
Break in parts the array to be sorting. MergeSort an QuickSort are good examples because we break in two parts and then break again, and each part is sorting independently and when they finish return the array sorted and mix with the result of the previous thread and sort this.

13. Give an example of how, specifically, to distribute matrix multiplication.
When the matrix is big for example 10x10, we can cut in 4 matrices of 5x5 and each thread make a multiplication.

14. Name some of the difficulties in detecting faces in a single photograph using a computing cluster.
For detect a face in an image using a cluster, we need to send a part of the simple image in each thread, and then returns if the particular region of the image is a face or not. The difficulty is that all the computers in the cluster needs the same classifier trained on example faces, and the image database is only in the server and all the threads wants to access at the same time.

15. Describe in pseudocode how to implement the dining philosophers in a distributed system.
I don't write a pseudocode but I write some ideas about how the dining philosophers can be distributed.
First of all, the server says what philosophers can eat, because it have the counting of forks.
Each processor can be a philosopher waiting for the forks.
When a philosopher have two forks can eat, or execute a program. If take too much time, the server request the forks.
The server provide the fork to a different processor.
The server needs to know how much time one processor has been waiting, for avoid starvation.

I would do questions 6 to 10, but the following 5 questions I didn't see in another blog, so I add questions 11-15.

5 de abril de 2012

Week 10

Distributed and Parallel Systems
Contribution: Week 10
Ya había mencionado la sugerencia de la predicción del tiempo para el proyecto de grupo para esta clase de sistemas distribuidos y paralelos, pero no había encontrado gran cosa además de datos técnicos y puramente informativos.

Antes de entrar en el tema del proyecto me gustaría mencionar el como llegue a una herramienta que nos podrá ser de gran ayuda, si es que el grupo se decide ir por esta idea.

Ya que nosotros como proyecto mostraremos algún programa que corra en nuestro propio cluster, haciendo uso de las herramientas y conocimiento adquirido de cómputo paralelo, me puse a investigar que es lo que algunos centros de supercómputo en el país hacen. Encontrar centros de supercómputo fue fácil ya que en México hay varias universidades que tienen su propio centro, y que inclusive varias de ellas trabajan en conjunto para crear un complejo de computadoras, a pesar de que no estén en una misma área, pero bueno algo que me intereso fue información que encontré en la página de la universidad de Guadalajara.

CGTI - Universidad de Guadalajara

De esta página cito la definición que nos dan en la página de inicio del supercómputo:
"El supercómputo es la tecnología informática más avanzada de cálculo numérico que existe actualmente para desarrollar investigaciones complejas de alto nivel de especialización; es la única herramienta que le permite al investigador llevar a cabo, con certeza y velocidad, billones de cálculos matemáticos para estudiar problemas de gran magnitud."

La sección que nos interesa es la parte de infraestructura, donde primeramente podemos ver el equipo o hardware con el que ellos cuentan y que no es cualquier cosa.

La sección que me lleva un paso más al punto que quiero llegar en esta publicación es la parte del Software.

Entre las aplicaciones que se encuentran instaladas en sus clusters son:

Gaussian: Proporciona el estado de las capacidades de última generación para el modelado de la estructura electrónica.
Espresso: Es una suite integrada de códigos de computadora para cálculos de estructura electrónica de materiales y el modelado a nanoescala.
Siesta: Simulación electrónica con cúmulos de átomos.
PWscf (versión espresso-4.0.4): Simulación computacional de dinámica molecular.
WRF: Weather Research and Forecasting Model.
Amon: Herramientas de monitoreo para Wrf.
Aprof: Herramientas de monitoreo para Wrf.
Bechmark: Herramientas de monitoreo para Wrf.

Los modelos de paralelismo que usan son:
  • MPI
  • OpenMPI
  • Hdf5-Netcdf
  • Mpich2
También usan varios compiladores, entre los que se encuentran Gfortran, g++, PGI, Ncarg y Zlib.

Ahora pongamos atención a las aplicaciones que ellos utilizan, podemos notar que la mitad de ellas son para la predicción del clima.

Y es ahora donde llego a la parte de la predicción del clima, ellos usan el modelo "Weather Research and Forecasting" (WRF), y al investigar de que se trataba este modelo resulto que el modelo es un programa de computadora creado para facilitar la investigación y pronóstico del clima.

El WRF es posible instalarse en nuestras computadoras ya que es posible descargar el código fuente de la página oficial, y cabe mencionar que este programa es usado por muchas dependencias en los estados unidos, inclusive por estaciones militares. En realidad es una de las herramientas de pronóstico de clima más usado en el mundo, y es de alguna forma "libre".

La siguiente imagen es una muestra de lo que se puede obtener con esta herramienta y unas cuantas más que se tienen que instalar.


La animación proviende de wikipedia, donde podrán ver más información del WRF.

WRF - Wikipedia

Y la misma página de la universidad de Guadalajara tiene el sistema funcionando y podemos ver las animaciones que se están produciendo. Por lo menos desde hoy en pronóstico de precipitaciones llega hasta dos días adelante, por lo que podemos cerciorarnos de que no es solo una simple animación.

Clic para ver en vivo el pronóstico


Entonces ahora sabemos que existe una herramienta para el pronóstico del tiempo, ya que evidentemente no vamos a crear algo nuevo en esa área ya que involucra muchos años de investigación, acerca de los patrones del clima, nosotros solo haremos el uso de la herramienta, y la acoplaremos a nuestro conjunto de computadoras para que los resultados estén disponibles en tiempo real.

Además como todo buen paquete de código, la página oficial de WRF tiene su propio tutorial para poner a andar el programa y vienen con algunos ejemplos de datos para pronósticos de algunos fenómenos naturales sucedidos hace algunos años, los cuáles podemos probar.

Ya le di una revisada a todo el tutorial, es un poco extenso, debido a que hay varias cosas que instalar y otras cosas a configurar, pero de eso hablaré en la próxima entrada.

4 de abril de 2012

Week 9

Distributed and Parallel Systems
Contribution: Week 9
Mientras buscaba algo de implementaciones al computo paralelo, encontré un caso de estudio llamado "Tuple Space", del cual me disponía a hablar, pero al estar leyendo acerca de él, vi un ejemplo de este caso en un lenguaje llamado Linda, y como me causó curiosidad investigué y encontré que fue creado especialmente para el computo distribuido. De este existe una versión para Python llamado PyLinda, y es de lo que hablo esta semana en el wiki.

Enlace al wiki: PyLinda


Para complementar la aportación aquí hay un resumen de lo que es el lenguaje Linda y las acciones que se hacen con el, y su caso representativo el del espacio de tuplas.

Linda tiene varias extensiones o versiones para diferentes lenguajes entre ellos tenemos a Python, C y Java, que suelen ser comunes en el ámbito de la programación.

El concepto sobresaliente de Linda es el espacio de tuplas, que sin entrar en definiciones exactas, es el espacio por el cual los procesos se comunican, y es de ahí de donde comparten información la cual todos los procesos están usando en algún momento.

Una tupla puede ser un campo de variables de un mismo tipo donde los procesos mandan la información obtenida.

Linda tiene 4 primicias que son:
out - para añadir datos al espacio de tuplas
eval - evaluar una cierta instancia y luego se agrega
rd - leer u obtener elementos
inn - elimina un elemento


Los círculos son los procesos y la mancha del centro es la tupla donde están almacenados los datos obtenidos.

Y como no podía faltar un vídeo que nos de una mejor idea de lo del espacio de tuplas.


Bibliografía
Linda en PDF

29 de marzo de 2012

Week 8

Distributed and Parallel Systems
Contribution: Week 8
Investigué algo para la posible opción de aplicación para nuestro cluster. Se trata de hacer un pronóstico del tiempo, el cual es comúnmente procesado por supercomputadoras que ayudan a analizar gran cantidad de datos y relaciones entre ellos para dar un estimado del futuro clima o cambio climático.

Enlace al wiki: Clima

8 de marzo de 2012

Week 6

Distributed and Parallel Systems
Contribution: Week 6
Last week I was working in the Send File code, I changed the part of the clients and accept to many clients at the same time with threads and send the same file to several clients.

For this week I'm doing a quicksort in parallel.

Link to the wiki: (NULL)

Parallel Quicksort


Quicksort is a divide and conquer algorithm. Quicksort first divides a large list into two smaller sub-lists: the low elements and the high elements. Quicksort can then recursively sort the sub-lists.

The steps are:
* Pick an element, called a pivot, from the list.
* Reorder the list so that all elements with values less than the pivot come before the pivot, while all elements with values greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.
* Recursively sort the sub-list of lesser elements and the sub-list of greater elements.

The base case of the recursion are lists of size zero or one, which never need to be sorted.


Like merge sort, quicksort can also be parallelized due to its divide-and-conquer nature. Individual in-place partition operations are difficult to parallelize, but once divided, different sections of the list can be sorted in parallel. The following is a straightforward approach: If we have P processors, we can divide a list of N elements into P sublists in O(n) average time, then sort each of these in average time.

One advantage of this simple parallel quicksort over other parallel sort algorithms is that no synchronization is required, but the disadvantage is that sorting is still O(n) and only a sublinear speedup of O(log n) is achieved. A new thread is started as soon as a sublist is available for it to work on and it does not communicate with other threads. When all threads complete, the sort is done.

This is the code. I will put this in the wiki.
#include <stdio.h>
#include <stdio.h>
#include <pthread.h>

int acomodar(int *v, int b, int t) {
  int i;
  int pivote, valor_pivote;
  int temp;

  pivote = b;
  valor_pivote = v[pivote];
  for (i=b+1; i<=t; i++){
    if (v[i] < valor_pivote){
      pivote++;
      temp = v[i];
      v[i] = v[pivote];
      v[pivote] = temp; 
    }
  }
  temp = v[b];
  v[b] = v[pivote];
  v[pivote] = temp;
  return pivote;
}

void *quick(int* v, int b, int t) {
  int pivote;
  int th;
  pthread_t thread1, thread2;
  if(b < t) {
    pivote = acomodar(v, b, t);
    th = pthread_create(&thread1, NULL, quick(v, b, pivote-1), NULL);
    th = pthread_create(&thread2, NULL, quick(v, pivote+1, t), NULL);
    pthread_exit(NULL);
  }
}

int main(int argc, char** args) {
  int arreglo[100];
  int i;
  for (i=0; i<100; i++) {
    arreglo[i] = rand()%10000;
  }

  quick(arreglo, 0, 99);
  for (i=0; i<100; i++) {
    printf("  %d", arreglo[i]);
  }
  printf("\n");
}

Comparison BubbleSort vs. QuickSort


I like this video because we can see how QuickSort is faster than the BubbleSort. Imagine quicksort in parallel, two robots helping to compare at the same time.


Nominations:
No one

Links
Quicksort
Divide y Vencerás
Quicksort in neoteo
Quicksort in Wikipedia

25 de febrero de 2012

Week 5

Distributed and Parallel Systems
Contribution: Week 5
Last week I was working in a example of send a file from server to a client. But now I'm working in the same code, but I'm trying to change part of the clients and accept to many clients at the same time with threads and send the same file to several clients.

Link to the wiki: Sendfile in Java (modified)

Nominations:
No one

20 de febrero de 2012

Week 4

Distributed and Parallel Systems
Contribution: Week 4
This week I'm working in a example of send a file from server to a client. My code is simple, by default the IP is localhost, only for test it in the same computer. But with threads we can have a program that send the same file to several clients. But this change I will do it the next week.

Link to the wiki: Sendfile in Java

Nominations:
Juan Carlos
Rafael
Cecilia Urbina

This image is a simple executation of the program Server to Client.

16 de febrero de 2012

Week 3

Distributed and Parallel Systems
Contribution: Week 3
Last week I did the Consumer-Producer algorithm with threads.
This week I'm working with some simple examples of algorithms in parallel.

This is the link to the Wiki:
Parallel Prime

Nominations:
Gabriela Cárdenas
Cecilia Urbina
Carmen Suárez

8 de febrero de 2012

Consumer-Producer in C

Distributed and Parallel Systems
Laboratory: Week 2
This is a small example of the consumer-producer with threads in C.


4 de febrero de 2012

Week 2

Distributed and Parallel Systems
Contribution: Week 2
This week I only investigated some aplications about parallel computing. The next week I will post something about a particular aplication, that we can implement for the grupal proyect.

This is the link in the wiki: Examples in real life

This is a copy of the info that I write in the wiki. I did this because I don't know if someone accidentally erase or change the info that I wrote, and I want to have a copy of the original text.

References
Introduction to Parallel Computing

1 de febrero de 2012

Week 1

Distributed and Parallel Systems
Contribution: Week 1

What is a supercomputer?


The Free On-line Dictionary of Computing has this definition for "supercomputer":
A broad term for one of the fastest computers currently available. Such computers are typically used for number crunching including scientific simulations, (animated) graphics, analysis of geological data, structural analysis, computational fluid dynamics, physics, chemistry, electronic design, nuclear energy research and meteorology.

The speed of most computers was, for many years, measured by how many millions of instructions per second, or MIPS, they could execute. Variability in instruction sets has made this benchmark a poor indicator of performance and so it is rarely used anymore. Since supercomputers have always been number-crunchers, their speed is measured in floating point operations per second, or FLOPS, in units of megaflops (MFLOPS), gigaflops (GFLOPS), and teraflops (TFLOPS) which refer to millions, billions, and trillions of FLOPS, respectively.

History


Much of the early history of the supercomputer is the history of the father of the supercomputer, Seymour Cray (1925-96), and the various companies he founded; in particular, Cray Research, which was the U.S. leader in building the fastest supercomputers for many years. Cray's mission throughout his life was to build the fastest computer in the world, a goal he first realized in developing the first fully transistorized supercomputer, the CDC 1604, in 1958 Control Data Corporation, a company he founded with William Norris in 1957. He went on to design the CDC 6600, which used 60-bit words and parallel processing, demonstrated RISC design, and was forty times faster than its predecessor, followed by the CDC 7600 system. These machines would give Control Data the clout to push the mighty IBM out of the scientific computing field for a time.

Cray left Control Data in 1972 to found Cray Research following a disagreement with Norris, then CEO, who had put a new computer on hold. Always a private man, Cray was never very interested in company management so, as he had with Control Data, he relinquished control of the company after five years and worked out a deal that allowed him to do research and development at a lab away from company headquarters. After designing the 100 megaflops CRAY-1 computer in 1976 and the 1-2 gigaflops CRAY-2 computer system in 1985, both of which were the fastest supercomputers in the world when they were introduced, he again parted ways with his company after top-management elected not to go ahead with his new project, the Cray 3. Founding Cray Computer Corporation in 1989, he again built what would be (briefly) the fastest supercomputer in the world at around 4-5 gigaflops, the Cray 3, which is based on superfast 1 GHz gallium arsenide (GaAs) processors rather than conventional silicon processors, which were, and still are, topping out at 400-500 MHz. He followed it with the Cray 4, also based on gallium arsenide, which is twice as fast in per-node performance as the Cray 3 and is smaller than the human brain.

For many years, Seymour Cray and his companies dominated supercomputing. Eventually, other companies began finally to compete directly. Thinking Machines Corporation, for example, is another company that was famous in the field of supercomputing. Their Connection Machines, which could contain 65,536 SPARC or superSPARC processors, were among the first massively parallel machines.

Nowadays


The next video it's very interesting. Is about how Acer create a supercomputer center, and we can see all the components that they used and the steps followed for the construction of this center.


Supercomputers in Mexico


There is a new Supercomputer Center in Mexico, named Argentum, located in San Luis Potosí. The UNAM has a supercomputer named KAN-BALAM, but now I will show you some information about Argentum.

El Instituto Potosino de Investigación Científica y Tecnológica (IPICYT) realizó la puesta en operación del nuevo cluster del Centro Nacional de Supercómputo, nombrado Argentum, con tecnología y asesoría de IBM, el cual servirá para atender las necesidades y los requerimientos en materia de Computo de Alto Rendimiento de la comunidad científica potosina y nacional.

El Argentum, un cluster E1350 Blade Center, fue manufacturado en la planta de IBM de Guadalajara y representa un poder de procesamiento de 6.2 TeraFlops con 83 nodos de cálculo (que suman 664 procesadores Intel XEON EMT64). El equipo cuenta con 15 TB de almacenamiento y 5 nodos de visualización de alto rendimiento. Estas características lo convierten en la primer computadora de alto rendimiento en el país, fuera de la Ciudad de México. La capacidad de este equipo lo coloca aproximadamente en la posición 400 entre las Top 500 computadoras en el mundo.

El equipo será usado en proyectos de investigación de Química Cuántica, Astrofísica, Modelación de Climas, Biotecnología, Procesamiento Numérico Intensivo, Biología Molecular, y para proyectos del Gobierno de San Luis Potosí, y de otros que así lo demanden.
From Software Guru news.

A video of this center with the explanation of one of the managers in spanish


References
Supercomputers by Dan Calle

Nominaciones
Roberto Martínez por su entrada "Ordenamiento por mezcla".