Sunday, 26 January 2014

Building a Beowulf cluster with Ubuntu

What are Clusters
A computer cluster is a group of linked computers, working together closely so that in many respects they form a single computer. Clusters are generally connected by a fast Local Area Network. Parallel programs that run on one of the nodes uses the processing power of all the nodes and produces the result. They'll share RAM, Hard Disk and other peripherals. Operating System runs on one of the nodes and controls the activities of other nodes. For more information refer wiki pages.

What is a Beowulf Cluster
A Beowulf cluster is a computer cluster of what are normally identical, commodity-grade computers networked into a small local area network with libraries and programs installed which allow processing to be shared among them. The result is a high-performance parallel computing cluster from inexpensive personal computer hardware.

Setup

For the detailed setup and information you can see here. I am writing about my experience and the problem occurs while setup the Beowulf cluster.

First of all we required two or more than two nearly identical system. Nearly identical means each computer should be roughly comparable in terms of speed and memory capacity and should be running same OS. I used three system having Ubuntu desktop version 11.10, 12.04 and 12.10.
Then we need to connect these system via same network. If you have just two computers, you can connect them using an Ethernet wire. Make sure that IP addresses are assigned to them. If you don't have a router to assign IP, you can statically assign them IP addresses.

My all three system is connected to my college network so i didn't required to do any configuration.

Then I follow the above page link for the setup.

While creating a user account it is possible that user with that name is already exist in that case either choose different name or use the already created user.

Sometimes it may also possible that when you deleted your account and you forget to remove the home directory of that then when we create new user account with same user name it will create user but add 1 at the back of home directory name. So remove the earlier home directory.

If you are connected with proxy network then update your apt.conf file with user id, password and proxy. sometimes proxy created some problem while running MPI jobs. I prefer Hydra process manager because in my case mpich2 have some problem while installing.

For the MPI the given MPICH is only for C,C++ and FORTRAN, So if you want for perl and python you can search on google for "perl mpi" or "python mpi". 

Sunday, 19 January 2014

CentOS as a Guest OS in VirtualBox

Download CentOS ISO image
You can download CentOS iso image from its website. No need of burning CD or making bootable USB drive.

Download Oracle VirtualBox and install it
You can download VirtualBox from its website according to your current OS like .exe, .rpm, or .deb etc and install.

Make a new virtual machine
After finishing installation, launch virtual box and create new virtual machine.

  1. Press “New“, Type as “CentOS 64 bit” or anything you want. Set the type as “Linux“, Version as “Red Hat 64 bit“. And press “Next”. 
  2. Allocate “Memory ” to 512 Mb or 1024 MB . You can increase this value according to requirements. And Press”Next“. 
  3. Then select “Create a virtual Hardisk Now” and press “Create“. 
  4. Then choose “Dynamically allocated“. Note:- You can choose "Fixed size" also according to your requirement. 
  5. Choose the amount of hard disk space you want to allocate for your CentOS system. Select atleast 8Gb-10GB . I have allocated 15GB. And press “Create“. 
  6. You would see the Virtual Box Home Screen. Now Press on “Start“. 


Installing CentOS
After creating virtual machine, following step for installing CentOS.

  1. After pressing "Start", click on the small folder icon and select the location of iso image file and press "Start". 
  2. Once you click start you virtual machine starts up for the first time in a new window. 
  3. Choose language and press "Next". 
  4. Select the model of the keyboard or just leave it to the default value. then press “Next“. 
  5. Select basic storage devices as we fall under that category. then press “Next“. 
  6. In the next screen it will ask to discard any data that exists in the hard disk that you created earlier for this VM. Go ahead and say yes to that. Note : This is not going to discard any of your main hard disk data. Only discard the VM HDD drive that you created along the way which should be empty any way. 
  7. Name your new CentOS VM Server. Name to what ever you want this server to be called as, then press "Next". 
  8. pick a time zone for the Cent OS. then press “Next“. 
  9. Enter a password for root user. If you are a newbie to Linux, root user is like administrator.then press “Next“. 
  10. In this screen you can choose how to layout your partitioning schema. I am not covering how to change default partitioning schema[Custom partitioning] here. Pick the default option "replace existing systems". This will clean wipe the VM HDD one more time and layout partitioning schema to install CentOS. then press “Next“. 
  11. Go ahead and write changes to disk and Cent OS will start installing in your Virtual Machine. 
  12. Congratulations ! you now have successfully installed Cent OS Linux Virtual Machine Server. 

Note:- Do not forget to eject the iso image file in settings->storage.