Saturday, December 29, 2007

Drat! Has the Long, Slow Decline Begun?

Bhutto was assassinated yesterday. That was quite sad! Perhaps a sign that things may get worse before they get better. Robert Reich has some insight and comments on the inconsistency in current foreign policy. Her assassination wasn't a surprise to Pat Lang.

On the home front, the NSA managed to give away secret intel and paid the Chinese to steal it. I'm sorry, but it's inherently stupid to outsource intelligence work, especially sensitive intel. The NSA should be exempt from the government hiring freeze. The dumbass who authorized this outsourcing should be fired and his pension should be taken away.

Gather round and watch the U.S. circle the drain due to inept foreign policy, inept monetary policy (i.e. credit crunch due to ignoring lending policies and regulations), stupid government practices (see above), etc. It'd be amusing if it were another country. It hurts worse, seeing it happening all around you. The average person is just trying to tread financial water, while others are trying to become millionaires and billionaires off of the little guys/taxpayers/consumers via hypercapitalism. I call it that, because supercapitalism sounds like a good thing, whereas hypercapitalism can have a neutral or negative connotation. Anything taken to excess can have negative consequences.

Labels:


Thursday, December 27, 2007

That Was So Not Fun, Part II

Well, after more than 5 hours of speeding down I-20 to get home, I greeted my cats, partially unloaded my car, sat down at my desk, and lo and behold, the screen was locked up on my rebuilt workstation last night. Rebooted it and uh-oh!, it can't find the boot sector on the hard drive. Pop in the Maxtor diagnostic floppy I made last week and worse news, the drive gave a failure code. Ran over to CompUSA today to grab a drive on sale (hah!) because they were going out of business. Slaved the new drive, boot up with a Live CD, fdisk the new drive, then mkswap /dev/sda1 ; mkfs -t ext3 /dev/sda2 ; mkfs -ext3 /dev/sda3 , then mount the new partitions under /media - mount -rw /dev/hdb2 /media/hdb2 ; mount -rw /dev/hdb3 /media/hdb3, then rsync -a /media/hda2/ /media/hdb2/ and rsync -a /media/hda3 /media/hdb3/ (two hours to copy everything from this partition), and I think I'm almost done. I just have to replace the old drive with the new drive after changing the jumper from slave to master on the new drive, then boot up with the Live CD, mount -rw /dev/hda2 /media/hda2 ; chroot /media/hda2 ; grub-install /dev/hda to reinstall the MBR. Not so fast! I get an interesting error - "/dev/hda does not have any corresponding BIOS drive", when I used either /sbin/grub-install or /usr/sbin/grub-install. I found an interesting RedHat knowledgebase article that was kind of helpful. I sort of stumbled on the fix by accident. While in the chroot environment, you have to type grub to go into the grub command shell, then type root (hd0,1) (note:hd0,1 means first drive, second partition for the root partition), followed by setup (hd0) to write to the MBR. Then you need to find the UUIDs of the new drive's partitions (swap, sda2, and sda3). That's right, I should have used the Sidux Live CD instead of a Kanotix Live CD. Once you have the new UUIDs in hand using "udevinfo -q env -n /dev/sda1", etc., edit /boot/grub/menu.lst and /etc/fstab to reflect the new UUIDs. You only need the root partition's UUID for the menu.lst, but you'll need all of your UUIDs for /etc/fstab. Shut the system off, take the Live CD out and she should boot into your recovered system. Only took me an additional 2 hours to stumble upon the solution. Total time to migrate my data to a new drive and make it bootable was 5 hours (almost 3 hours to migrate, and 2 hours to make bootable). I probably can get it down to 3.5 hours now.

Labels:


Friday, December 21, 2007

Thoughts on the Toshiba Microreactor

All the geewiz web sites are touting the new Toshiba microreactor, such as this one. It's probably a great idea. Forty years of trouble free, hassle free electrical power. One person suggested the cost would be about $3.5.million. My cynical mind immediately thought of three reasons why it'll never happen here:

1. It would likely put the power companies out of business and a lot of coal, oil and gas producers sit on the electric utility boards.

2. We haven't processed or disposed of the nuclear waste that we already have at our commercial nuclear power plants. Some of those plants have been shut down for years already. We're talking 40 years worth of fuel rods waiting to be disposed of. So, what happens when we have to dispose of the first microreactors in 2050?

3. The fearmongers would scream that you could make a dirty bomb out of one used microreactor. We can't have terrorists getting access to that material. Nevermind that you'd likely need some hefty machinery to access the core without lethally irradiating yourself.

Nevermind that these reactors would liberate the West from having to depend upon culturally and politically backward countries for our energy needs and solve the "War on Terror" almost overnight for a fraction of the costs we are paying now. (One year's expenses for the war in Iraq would buy us 29,714 microreactors.) The Arabs can go back to killing each other over Allah and scarce resources, and leave the rest of us in peace.

Refuse to be Frightened

Refuse to give in to your fears

Labels:


Thursday, December 20, 2007

NFS and Yellow Dog Linux

NFS appears to be broken on this version of Yellow Dog Linux (5.0.2). It just will not allow mounting of remote shares. I also tried installing the Parallel Virtual Filesystem. That was a worse wash. I had to hack the configure file to get the makefile created and then watched make fail when it looked for the Intel x86 gcc libraries on a PPC64 system! Some days you just can't win.

Labels:


Tuesday, December 18, 2007

That Was So Not Fun!

I removed a soundcard from my main workstation yesterday because it's blown out two speaker systems lately and I didn't want to chance a third speaker set being destroyed. Blew out the dust from the case, cleaned dust off of the CPU fan blades and somehow managed to disconnect the main hard drive without touching it. After reseating the cable, thought everything was fine until I got up last night and went to use the computer and it was frozen. I lost the entire filesystem on the operating system partition. The drive checked out fine. Usually there's damage to the platters, but this was just the reiser filesystem hosing me good. Tried all the repair tricks I could find and yep, I was royally screwed. So, reinstalled a newer version of Linux from Sidux.com. Have plenty of free space on the os partition now! Here's a snapshot of my new desktop:



It's a multiwavelength image of the M81 galaxy courtesy of the Spitzer Space Telescope.

Labels:


Sunday, December 16, 2007

Building a Yellow Dog Linux PS3 Cluster

This is a modification of the Mueller group's protocol for building a PS3 cluster using YellowDog Linux (YDL) instead of Fedora Core 7 (see README.fedora7)

Download a public copy of YellowDog Linux (currently version 5.0.2) and burn the iso

Installation Guide

1. Install the Linux Operating System (YDL 5.0.2) on the PS3 Playstation. You
will need a HDMI cable. Only the default installation works. Trying to change the
partition scheme from default results in a bootloader installation failure. The
DVD contains the otheros bootloader image. You will need to partition the hard
drive, install the otheros bootloader, and change the Default OS option in System
Settings using the Sony Playstation controller the first time. Afterwards, the
Playstation Setup menu can be accessed via USB keyboard.

At the kboot prompt during startup, one can boot between Linux and PS3 using the
following command: boot-game-os (to boot into the PS3 console).

2. Install the SDK prerequisites using YUM
yum install rsync sed tcl wget ypbind nfs rsh-server xinetd
(some of these may already be installed)

3. Mount the DVD using the command mount /dev/dvd /mnt , then cd /mnt/YellowDog/RPMS.
Install the elfspe binary rpm from the DVD. rpm -ivh elfspe*.rpm . Alternatively, you
can install this and other packages' RPMs via the GUI based Software Installer. Install
the kernel source and kernel source headers at this time.

4. Update packages using the yum command: yum update.

5. Install OpenMPI rpm: yum install openmpi-1.1.1-1yhpc.2

8. Add exclusions to the YUM configuration file /etc/yum.conf (append to the [main] section):
exclude=blas kernel numactl oprofile

9. Test the Cell SDK that came with YellowDog using the instructions from the following links:
http://www.ibm.com/developerworks/power/library/pa-linuxps3-1/
http://www.ibm.com/developerworks/power/library/pa-linuxps3-2/

If running the compiled factorial program from the second link fails
(i.e. ./factorial), then you forgot to install the elfspe rpm
that is required to run SPE programs directly.

10. Disable and enable the following services using services, chkconfig, or ntsysv:
chkconfig --level 345 autofs on
chkconfig --level 345 nsf on
chkconfig --level 345 nsflock on
chkconfig --level 345 rsh on
chkconfig --level 345 ypbind on
chkconfig --level 345 nfslock on
chkconfig --level 345 nfs on
chkconfig --level 345 bluetooth off
chkconfig --level 12345 anacron off

11. Selinux should already be disabled.

12. Create the huge TLB Filesystem:
mkdir /huge

create /etc/init.d/hugetlbfs (needed early in boot sequence while consecutive memory
is available). Link hugetlbfs to startup scripts in rc3.d, rc4.d, and rc5.d:
ln -s /etc/init.d/hugetlbfs /etc/rc3.d/S07hugetlbfs :

#!/bin/csh
#
# This script will be executed *early*.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

set kernel=`uname -a | awk '{print $3}'`
if ( "$kernel" == "2.6.22-0.ydl.rc4" ) then ;
echo 1 > /proc/sys/vm/nr_hugepages
mount -t hugetlbfs nodev /huge
chmod 755 /huge
endif

chmod 755 /etc/rc3.d/S07hugetlbfs

13. Install netpbm via yum:
yum install netpbm-devel-10.34-1.ppc (there doesn't seem to be a ppc64 version with
YDL either on the CD or the repo)

I didn't do the following test because of the differences in the installation:

#matmult example
yum -y install netpbm-devel.ppc64 (cannot install due to failed dependencies. Go to
http://fedora.fastbull.org/development/ppc/os/Fedora/ and try it yourself.)

ln -s libnetpbm.so.10 libnetpbm.so
tar xf /opt/cell/sdk/src/demos_source.tar
cd demos
make INSTALL_DIR=bin
matrix_mul/matrix_mul -i 10 -m 128 -s 6 -v -1
-> not working, /huge problem, VM kernel error in /var/log/messages, turn selinux,
usr addon kernel and it works
matrix_mul/matrix_mul -i 10 -m 128 -s 6 -v -1 -H
-> works

14. Setup rsh. Note: /etc/xinetd.d/rsh is already installed via yum.

Working /etc/xinetd.d/rsh:
# default: on
# description: The rshd server is the server for the rcmd(3) routine and, \
# consequently, for the rsh(1) program. The server provides \
# remote execution facilities with authentication based on \
# privileged port numbers from trusted hosts.
service shell
{
disable = no
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
}

append the following to /etc/securetty:
rsh

add this line to the first line of /etc/pam.d/rsh and remove the old pam_rhost auth line:
auth required pam_rhosts_auth.so promiscuous

create /etc/hosts.equiv:
+ +
create ~/.rhosts, chmod 600:
hostname of the remote system (i.e.ps3)

Restart the xinetd and network services:
service xinetd restart
service network restart

Test using the following command: rsh remote_hostname cmd (i.e. rsh ps3 pwd)

If you get an error stating "no route to host", from the console type the
command:
iptables -F ; iptables -L

If you then get a "permission denied" error when you run the rsh test, check
the /var/log/secure log. If it says,"rshd[4949]: pam_securetty(rsh:auth): access
denied: tty 'rsh' is not secure !", then what I did was copy a working
/etc/securetty, /etc/pam.d/rsh, and /etc/pam.d/rlogin using scp from a working
node to the broken node.

rsh should now work. I permanently disabled the firewall using the GUI
Configuration program.

15. Setup mpich:

yum install libXt-devel-1.0.0-2.2.ppc

One cannot install the java-1.5.0-gcj-devel rpm on YDL due to too many
failed dependencies.
yum -y install java-1.5.0-gcj-devel

Build the mpich2 rpm from the src rpm:
mkdir .kpackage
cd .kpackage
wget ftp://czar.eas.yorku.ca/pub/mpich2/mpich2-1.0.6-1.fc8.src.rpm
wget ftp://czar.eas.yorku.ca/pub/mpich2/mpich2.spec
rpm -Uvh mpich2-1.0.6-1.fc8.src.rpm
rpmbuild -bc -v /usr/src/yellowdog/SPECS/mpich2.spec
cd /usr/src/yellowdog/BUILD/mpich2-1.0.6
make install

create mpd.conf (http://www-cs.etsu.edu/hpc/ppga/MPICH2.doc):

For root:
echo "MPD_SECRETWORD=your_secretword" > /etc/mpd.conf
echo "#MPD_USE_ROOT_MPD=1" >> /etc/mpd.conf
chmod 600 /etc/mpd.conf

For regular users:
echo "MPD_SECRETWORD=your_secretword" > ~/.mpd.conf
echo "#MPD_USE_ROOT_MPD=1" >> ~/.mpd.conf
chmod 600 /etc/mpd.conf

In /etc/hosts remove the alias from the first line:

Change:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost node0
192.168.1.5 node0.google.net node0

To:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.5 node0.google.net node0

Create the mpd.hosts file in your home directory (root can create /etc/mpd.hosts) -
only include working nodes:
node0
node1
node2

Start mpich2 service (for two nodes):
mpdboot --totalnum=2 --ncpus=2 -v --ifhn=node0 --rsh=rsh --file=/etc/mpd.hosts

Output:
running mpdallexit on node0
LAUNCHED mpd on node0 via
RUNNING: mpd on node0
LAUNCHED mpd on node1 via node0
RUNNING: mpd on node1


Test the mpich2 installation:
From a console, type mpdtrace. One should see:

[root@node1 ~]# mpdtrace
node0
node1

Create pi.c:

#include "mpi.h"
#include
#include

double f( double );
double f( double a )
{
return (4.0 / (1.0 + a*a));
}

int main( int argc, char *argv[])
{
int done = 0, n, myid, numprocs, i;
double PI25DT = 3.141592653589793238462643;
double mypi, pi, h, sum, x;
double startwtime = 0.0, endwtime;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];

MPI_Init(&argc,&argv);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Get_processor_name(processor_name,&namelen);

fprintf(stderr,"Process %d on %s\n",
myid, processor_name);

n = 0;
while (!done)
{
if (myid == 0)
{
/*
printf("Enter the number of intervals: (0 quits) ");
scanf("%d",&n);
*/
if (n==0) n=100; else n=0;

startwtime = MPI_Wtime();
}
MPI_Bcast(&n, 1, MPI_INT, 0, MPI_COMM_WORLD);
if (n == 0)
done = 1;
else
{
h = 1.0 / (double) n;
sum = 0.0;
for (i = myid + 1; i <= n; i += numprocs)
{
x = h * ((double)i - 0.5);
sum += f(x);
}
mypi = h * sum;

MPI_Reduce(&mypi, &pi, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD);

if (myid == 0)
{
printf("pi is approximately %.16f, Error is %.16f\n",
pi, fabs(pi - PI25DT));
endwtime = MPI_Wtime();
printf("wall clock time = %f\n",
endwtime-startwtime);
}
}
}
MPI_Finalize();

return 0;
}

Compile:
mpicc -O3 -o pi pi.c

Execute:
mpiexec -n 4 /$HOME/pi (for single node)

rsync or scp pi executable to both nodes, then

mpiexec -n 4 -host node0 /$HOME/pi : -n 4 -host node1 /$HOME/pi

Stop mpich2:
mpdallexit

One can stop the X server by reverting to runlevel 3:
init 3 (fix this in /etc/inittab), or in /etc/kboot.conf, setting default=ydltext.

Labels:


Wednesday, December 12, 2007

Shotgunned From Space

According to the BBC, animals within the Arctic Circle were shotgunned from space by a nickel-iron meteorite airburst about 35,000 years ago. Eight Alaskan mammoth tusks and a bison skull from Siberia were found to have pockmarks that were magnetic and of extraterrestrial origin. Researchers were looking for evidence that something similar happened 13,000 years ago resulting in the Megafauna Extinction, the loss of many large and predatory mammal species in North America and around the world. (The cheetah is a survivor of the Megafauna Extinction. Only a family or two survived to reestablish the species.) However, the tusks and skull are three times older than they needed meaning that this is a separate event. Considering that bone and ivory tusks were pockmarked, it definitely had to hurt!

Labels:


The Internet is Amoral

People always focus on the good or bad of a technology. Several years ago, a group of us graduate students were talking about bioweapons or nuclear weapons when one of the smarter students (who was a woman) pointed out that technology is based upon knowledge and ideas, both of which are amoral. Nuclear energy can be used to heat homes or destroy those homes. The same goes for the Internet. If you know the underlying technology the Internet relies on, you can leverage it for good or ill.

One example of the good is that the Internet is becoming a new information medium. The BBC has this article about people reading blogs for news in countries where press censorship exists. One example of the bad is how spammers have started frequenting online dating sites to harvest email addresses. Well, it's gone up a notch. There is a program called Cyber Lover making the rounds in Russian online dating sites. It's a bot program that can chat with 10 or more people at any one time and through social engineering (i.e. lying) get them to give away identity data and personal information. Just when you thought that online dating was a bit safer than blind dates, now you'll be targeted because you use a computer for meeting people.

Labels:


Monday, December 03, 2007

What are Nuclear Weapons Good for?

Pete has an interesting post about Australia worrying about developing nuclear weapons or not. The current political climate in Australia may not support it, but the rising military dominance of China and India makes it an almost certainty that they'll have to either adopt nuclear weapons for defensive reasons, or develop some sort of Anti-Ballistic Missile technology. Nuclear weapons would be cheaper than developing and deploying an ABM technology. There is another, better reason for adopting nuclear weapons and it's a peaceful one. Nuclear weapons are the most powerful explosives mankind currently possesses. Some day, we will have to use nuclear explosives for vast civil engineering projects and Australia could be a beacon in that regard. If the geologists are right, the Aborigines burned down the vast interior forests of Australia 50,000 years ago creating the great desert known as The Outback. Because of early man's geoengineering, Australia is the most arid continent on the planet. How would one reverse that 50,000 year old mistake and bring the interior forests back? The use of nuclear explosives would be one approach.

What do I mean by this? Well, the monsoons don't go down far enough south any more. One would have to dig a canal from the north and may be the south of Australia into the interior of the Outback. One would also have to create a big enough inlet and inland sea such that the evaporation would affect the microclimate of the Outback and bring back the monsoons. If the Australian Outback were bisected by a canal with an inland sea through the interior desert, it would be more economical for shipping. Doing it with conventional explosives might be cost prohibitive, but nuclear explosives would likely work just fine. The critics will contend that it won't work. Yes, it will. Look at the Aral Sea. Before its rivers were dammed and diverted, it rained all around that inland sea. The Aral Sea is going to become the next great Outback if measures aren't taken to remedy the situation. Mankind alters the environment and climate all the time in the name of progress, all too often short-sighted progress. However, I have never heard any one state that the Panama Canal was ever a mistake, or ecological disaster.

The side benefit of this project would be the discovery of new mineral wealth, fossils, commerce, and deterrence. Likely no one would bother a people who work with nuclear explosives every day and have a sufficient supply on hand. If Australia partnered with Britain or the US to do the project, it'd be a win-win. Britain or the US would get to actually destroy obsolete weapons and weapons grade material in an economical and beneficial way. Australia would get a canal, an inland sea, jobs, commerce, nuclear deterrence, and their prehuman climate back. Trees could be planted around the canal and the inland sea and the desert reclaimed. It'll happen one of these years, but it's something the Australians should be talking about and discussing now. If the Aborigines can do all the damage they did with forest fires, then it might take modern man with a different kind of fire to fix it!

Australia currently:



Australia in the future?:

Labels:


This page is powered by Blogger. Isn't yours?