jueves, 29 de marzo de 2012

Contributions (week 8)

This week I made a contribution about how supercomputers can solve real life problems. I made some investigations and I found out that they are making huge contributions to medicine. That's why I thought it would be a good idea to solve a medicine problem as our project.

Here is the link to the wiki



My nominations of this week are for Roberto and for Carmen, because they gave us good examples of applications that we can realize in our project.

jueves, 22 de marzo de 2012

First meeting: Scheduling

On monday me, my classmates and my teacher had a meeting where we talked about the project we are making for this class. We also planned how we are going to divide the work for the next two weeks.
What we want to do is to make a cluster in order to work in parallel with different computers.
We all agreed to work on Ubuntu 10.04 64 bits and to create the same username and password (Sorry, I'm not writing them here...). The password creation took a while because we wanted a safe password that is not easily hacked.
When we finished thinking about the basic requirements for the cluster we thought about the tools and the languages we were going to use:
pyMPI and OOMPI.

After that we made a calendar with the activities we are going to make in order to finish our project. Here is the calendar:


As we can observe, first we are going to work in the configuration and installation of the tools we need to make the cluster work. Then we are going to actually work in the cluster and VPN. When we finish, we are going to run some tests to prove if it really works.

I'm going to write a report about each one of the next meetings we are having.

I added this report to the wiki:

http://elisa.dyndns-web.com/progra/Cluster




lunes, 12 de marzo de 2012

Py-par

Pypar is a useful tool that allows programs written in python to run in parallel on multiple processors and communicate using message passing.


Requirements:
  • Python
  • numpy
  • C compiler
  • MPI C library (such as openmpi)
To verify if the installation was correct we must write:

mpirun -np 2 testpypar.py

It must try to run a C/MPI program.

Here is an example program written in pypar

import pypar # The Python-MPI interface                                                                                                                 
numproc = pypar.size()
myid = pypar.rank()
node = pypar.get_processor_name()

print "I am proc %d of %d on node %s" %(myid, numproc, node)

if numproc < 2:
  print "Demo must run on at least 2 processors to continue"
  pypar.abort()

if myid == 0:  
  msg = "MSGP0"

  print 'Processor 0 sending message "%s" to processor %d' %(msg, 1)
  pypar.send(msg, 1)

  msg, status = pypar.receive(numproc-1, return_status=True)
  print 'Processor 0 received message "%s" from processor %d' %(msg, numproc-1)
  print 'Size of msg was %d bytes' %(status.bytes())

else:
  source = myid-1
  destination = (myid+1)%numproc

  msg, status = pypar.receive(source, return_status=True)
  print 'Processor %d received message "%s" from processor %d'\
     %(myid, msg, source)
  print 'Size of msg was %d bytes' %(status.bytes())

  msg = msg + '->P' + str(myid) #Update message                                                                                                            
  print 'Processor %d sending msg "%s" to %d' %(myid, msg, destination)
  pypar.send(msg, destination)

pypar.finalize()

This program sends a message to processor 0. The message is traveling through the processors in the form of a ring, where each one of the processors is adding a bit to the message, then it returns to processor 0.
In order to know what programs are running on the processors we can make the call myid = pypar.rank(). To obtain the total number of processors we write proc = pypar.size()

In order to start running py-par you can write:

mpirun -np 4 demo.py

This command will run 4 different copies of the program in different processors

My nominations of this week are for rafa, cecy and roberto.


Bibliography


Py-par documentation
Py-par: Parallel programming for python



jueves, 1 de marzo de 2012

List of words

Here I'm going to include some common words related to computer programming.

1. Transport
The transport layer is one of the seven layres of the OSI Model. It is the one that controls all the data flow and provides the delivery of data.

2. Message
A message is an object of communication that provides information

3. Disk
A disk is used to store and transport information.
 
4. Simulation
It is an imitation of the operation of a real world system

5. Resource
A resource is a component that is used with limited availability in a computer system. 

6. Object
An object is characterized because it has:
Attributes
Methods
Identities
 
7. Connection
It is a link between two computers, systems, networks, etc that allows the flow of information.

8. Clock
A clock is a device that measures and indicates time

 

Contributions of the week (Week 5)

During this week I made some contributions to the wiki of how an MPI is used in python and what do you need to do if you want it to run. I also added some code of programs using MPI.





My nominations are for Roberto, Juan Carlos and Rafa.