Simulating / Emulating a MPI Cluster or Supercomputer under Ubuntu Linux

Okay a few posts ago I mentioned that I had been successful in setting up my laptop as a virtual supercomputer.

Here are hopefully some relatively clear instructions on how simple it was to do.

Setting up a MPI development system on Ubuntu Linux

  1. Download Ubuntu – check out the latest version at www.ubuntu.com

  2. Intall the required mpi files.

    For Ubuntu 9.04:
    In a terminal window enter:
    sudo apt-get install libopenmpi1 libopenmpi-dbg libopenmpi-dev openmpi-bin openmpi-common openmpi-dev

    For Ubuntu 10.04:
    In a terminal window enter:
    sudo apt-get install libopenmpi1.3 libopenmpi-dbg libopenmpi-dev openmpi-bin openmpi-common openmpi-dev

  3. Test the mpi install by compiling and running a simple program

    1. mpicc testfile.c -o testfile

    2. mpirun -np 2 ./testfile

      1. Where np is the number of cores * number of processes on your system.

      2. e.g. on a two core laptop np should be 2.

  4. If you get an error regarding ssh when you enter the mpirun command install ssh

    1. sudo apt-get install ssh

  5. If you get requested for your password everytime you run mpirun set up a stored RSA key control

    1. cd $HOME

    2. ssh-keygen -t dsa

    3. cp .ssh/id_dsa.pub .ssh/authorized_keys2

Further reference:

http://www.csc.cam.ac.uk/academic/practicals.html

http://www.math.umbc.edu/~gobbert/mpi.html

Three Strikes Law would have saved no one.

From: http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=10565592

Not one of the 423 prisoners serving life sentences would have been stopped by the proposed “three strikes” law, official information reveals.

The Department of Corrections has released information that shows none of the prisoners would have been “struck out” before the offence that earned the life sentence.

The information is based on the definition of a “strike” in the Sentencing and Parole Reform Bill – one of a list of violent offences where the offender has been given a sentence of five years or more.

Corrections said that under the current definition none of the 423 prisoners serving a life sentence had three qualifying sentences for serious violent offences (or strikes) before their most recent life sentence.

Corrections also said that neither RSA killer William Bell nor samurai sword killer Antonie Dixon would have “struck out” before their crimes.

The information was provided under the Official Information Act to Rethinking Crime and Punishment’s Kim Workman, one of the biggest opponents of three strikes.

Mr Workman said the information showed claims by Act and its hardline MP David Garrett that 77 lives would be saved by three strikes was wrong.

To be fair to Act they have stated that the change in numbers is a result of the change of definition of what constitutes a strike. However as it currently sits we now have a bill which is in violation of the bill of rights, would in its new form save no one and lock no one up, put forward by an MP (David Garrett) who has not “time or respect” for anyone. Wasn’t this new government one that was meant to be stopping time and money wasting. It seems that a lot of time and money has been wasted on a bill that is dead in the water as it does absolutely nothing.

Windows vs Linux Installation

Okay in the last week I have had to do a windows installation and a linux installation onto a laptop.

In the past the windows install would have won hands down in terms of getting everything running out of the box. But not any longer, I now think that over the last two years linux has really come of age and is just simple to use and for the most part just works.

Firstly my experiences in windows installing.

  • Insert CD rom and install OS – about 30 minutes.
  • Remove cd rom restart do end user install, about another 30 minutes.
  • Boot into windows remove norton anti virus, install avast and do a boot time scan to ensure that in the few seconds between norton and avast nothing snuck onto the system – 1 hour.
  • Download and install windows updates 10 minutes to download 1 hour to install.
  • Reboot and install firefox and thunderbird 30 minutes.

All up for a basic working machine: 3.5 hours.

Linux installation.

  • Install OS from cd rom… 20 minutes
  • Reboot do end user install 10 minutes.
  • Get wireless networking drivers working – 1 hour.
  • Download and install updates less than 30 minutes.
  • Install anti-virus… not needed it is linux.
  • Install other software… apt-get install software name… under 5 minutes per piece of software.

All up… 2 hours… an hour of which was getting drivers for a wifi card to work, and if hardware vendors properly supported linux you could have a fully functioning up to date OS in under 1 hour.

Two years ago a linux set up would have taken days because of driver problems and even dependancy problems, but now linux has really matured and unless windows can improve its security a lot then in the long run linux will just become more and more popular.

….

Now of course people are going to come back and say that windows has more security holes because more people use it so therefore it is easier to break and if linux increased in popularity more people would write viruses and try to break it too. I do think there is half a point here. However for the most part linux makes you manually do stuff where windows if sometimes just a little to smart for its own good. I placed a flash drive into my computer yesterday that had a virus on it set to autorun, lucky for me my system stopped it. However, why windows insists on letting flash drives autorun is just plain weird… so windows getting lots of viruses is as much microsoft’s slack approach to system security as is it the fault of the virus writers themselves. Then again if there wasn’t security holes in windows norton and mcaffee would be out of work so there is an economics side to viruses as well.

A Very Valid Point

From kiwiblog.co.nz

Can we be allies again?

April 6th, 2009 at 5:35 am

The Herald reports:

President Barack Obama last night launched a drive to rid the world of nuclear weapons.

Sounds good. Let me known when you have Iran, North Korea, India, Pakistan, Israel and France to agree.

But in the meantime, if the policy of the Unied States is now to seek to eliminate nuclear weapons, then it makes no sense to continue with sanctions against New Zealand for having banned ships with nuclear weapons.

So will President Obama upgrade New Zealand from friend status back to ally, and end the stupid ban on troops exercising together?

Wubi

Okay, now there is no excuse for any geek or anyone with a keen interest in computers to not try out linux.

For the past year and a bit I have been playing around with Virtualbox and virtualization, the major problem here however is the speed of booting, and drivers etc as it is in an emulated/simulated environment.

Enter WUBI. Wubi is an installer that allows you to install Ubuntu and Linux Mint on an NTFS partiation and use the windows boot loader so it does absolute nothing to windows at all. And to make matters better you can access your windows files straight out of the box.

I have now had a WUBI Ubunutu set up for the past week and it is brilliant.

I am now trying a new distro called Linux Mint which is aimed at end users.

If you want some help getting it installed or just want to try it out just contact me, it is brilliant just really awesome.

Breaking News: Microsoft buys Apple

From: http://blogs.nzherald.co.nz/blog/mac-planet/2009/4/1/microsoft-buys-apple/?c_id=5

In a move is shocking the tech world – actually, and the rest of the world, too – Microsoft has just announced the acquisition of Apple Inc.

Microsoft CEO Steve Ballmer recently panned Apple as little more than a $500 logo – perhaps he was trying to get the value down before the purchase? In a recent interview with Business Week Ballmer was defensive on any issue that involved Apple.

He said “…now I think the tide has really turned back the other direction. The economy is helpful. Paying an extra $500 for a computer in this environment – same piece of hardware – paying $500 more to get a logo on it? I think that’s a more challenging proposition for the average person than it used to be.”

He also may have plans produce cheaper but slick netbooks using the stripped-down OS X version (iPhone OS 3) that runs on the iPhone and iPod touch. But the most immediate result of the acquisition will be the licensing of Mac OS X for PC from April 31st.

The new ‘Leopard MS Amalgam’ OS will work on any PC (or Mac) running an Intel or AMD processor (1.8GHz or faster) with 2GB of physical RAM and 60-120GB free hard drive space. It will be offered in the following versions: Home Basic X, Home Ultimate X, Family X, SoHo X, Business X and Enterprise X.

Home Basic will retail for NZ $170 and contain OS X, Mail and Safari Explorer (a new Microsoft web browser based on WebKit) and Preview, the image/PDF viewer, plus a couple of utilities.

Home Premium X will retail for $215 and contain Mac OS X, Mail, Safari Explorer and the renamed mTunes, mPhoto, mWeb, mMovie and mDVD.

Home Ultimate X is basically Home Premium bundled with ‘mWork’ – the renamed suite contains versions of Pages, Numbers and Keynote for Mac/PC. (It is assumed that the ‘mWork’ division and the Mac BU will be merged to create all new PC/Mac versions of Office/iWork and other productivity software.)

Family X is a five-user Home Ultimate. It will retail at $590. SoHo X version bundles the current version of Microsoft Office:Mac with the features of Home Premium and will retail for $274.

Business X will contains the mWork and Microsoft Office components along with server and network software and sync software for mobile devices. One license will cost between $360 and $520, according to a Microsoft NZ spokesperson.

Enterprise X will contain a full 64-bit version of the OS, have all the Business X features, developer tools, WebKit and other SDKs and multi language support. (Multi language support has been withdrawn from other versions of ‘mX’, apart from French, German, Japanese and Spanish, but language modules are available via Microsoft’s Upgrade Paths and Easy Transfer programs for additional fees.)

Full details on all the above versions will be released in the next few days, with extra options available to each version and specific system requirements.

Gamers are also happy – thanks to the new CrackPot transcoding software, all PC games will be available to run on the amalgam system withing just a few months. It is widely expected that Windows 7 and Apple Macintosh Snow Leopard will be completely merged in the next two years to create a new operating system platform. An insider in Seattle said this would most likely be called ‘MOS-Y’; software engineers around Seattle are already calling it that, apparently.

The Macintosh will become the Microsoft Macintosh Division – insiders in Seattle are already calling it ‘M&M’ , according to tech blogs. Immediate plans include refurbishing the entire Macintosh line to include brown and black versions of every machine, to be available from June 2009. Mac hardware design will remain headquartered in Cupertino with a Microsoft Hardware Division opening an office in Infinite Loop.

At the announcement to the press, Microsoft CEO Steven A Ballmer concluded ‘But there’s one more thing!’. Bill Gates took the stage and held up a new, reengineered iPhone in brushed anodised brown aluminium. “Introducing the mPhone!” shouted an ebullient Gates, while Ballmer capered about behind him.

It is thought that Windows Mobile may be discontinued with resources reallocated to iPhone development, with the iPhone OS becoming licensed to run on any smart phone.
Conversely, however, the iPod division is being renamed ‘iZune’. New models will be slightly heavier and bulkier as they all have replaceable batteries. All players will contain FM radios, play WMV files and the model range will be greatly expanded – there has been talk of 100 models to cater to all tastes. A rumour said that new iZunes would also get video, but this could not be confirmed.

Microsoft spokesperson Avril Foule said Microsoft had been working hard behind the scenes to acquire Apple for the last nine months and was very pleased at the conclusion of negotiations. Steve Jobs will retain a position on the Microsoft board but will be not be involved in the day-to-day running of the business. He was not available for comment.
Finally, Steve Wozniak has been appointed to consult to the Microsoft Entertainments Division.

There have already been angry Gates and Ballmer effigy burnings outside Apple Stores in California and New York, and a poorly-attended Jobs effigy burning in Arhu, Tennessee. Australian Apple fans lit candles outside the George St Apple Store.

For myself, the shock is still registering – but I expect there will be considerable relief in the Ballmer and Gates’ households. It may have been a costly process, but it means their families will finally be allowed to get iPods

Mark Webster