Wednesday, December 17, 2008
Ganglia tricks
1) remove dead node
try to restart gmond and gmetad.
in /etc/gmond.cong, try to set host_dmax=3600 (sec) in globals.
2) two clusters in one subnetwork
for gmetad to collect data from corresponding cluster (not the other), the trick is to set the TCP/IP port for these two clusters to be different. For instance, the default port is 8649. You can set the second one as 8648. Then, in the server with web frontend, edit gmetad.conf, and put something
data_source "Cluster1" c1_headnode:8649
data_source "Cluster2" c2_headnode:8648
to show all info in one web interface.
Wednesday, December 3, 2008
Create software RAID with mdadm
1) use "fdisk -l" to check the available hard drives. In my case, I will allocate 4 drives: /dev/sdb, to /dev/sde.
2) to create partitions on raid drives, "fdisk /dev/sdb"; "n->p->1" to create a new partition, /dev/sdb1, "t" to change partition type, use code "fd" to set it as Linux raid autodetect. Do the same for the rest drives.
3) to create the raid "mdadm
--create /dev/md0 --chunk=64 --level=raid5 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1". And it will report that /dev/md0 is created and started. (note that it's md0, 0 as number zero, not letter o).4) "cat /proc/mdstat" and wait for the reshaping process to complete. It will take hours, so don't wait, come back later. After this is done, continue the following.
5) to format the new device "mkfs.ext3 /dev/md0". It will also takes a little while to complete.
6) create a mount point and mount /dev/md0 there. You can also edit /etc/fstab to mount it automatically next time.
7) "mdadm --detail --scan > /etc/mdadm.conf" to save the raid configuration,
8) use "mdadm --detail /dev/md0" to check raid status. also "smartctl --all -d ata /dev/sdb" to check the SMART status of each hard drive.
Emacs problem in Cygwin after rebase
Tuesday, November 18, 2008
Insert driver to Linux initrd.img
Rocks documentation suggests re-compiling the kernel roll by putting in the device drivers. Somehow, the compiling process works but the installation has problems in finding in libs.
I found an easy way to insert the drivers, i.e., to modify the initrd.img.
The procedures are, for example,
1) in /tmp, mkdir /tmp/initdproject to create a work directory.
2) gunzip < /tftpboot/pxelinux/initrd.img > /tmp/initrdproject/initrd.img.unzipped
3) cd /tmp/initrdproject; mkdir initrd
4) cd initrd; cpio -idv < ../initrd.img.unzipped
5) mkdir /tmp/initrdproject/modules
6) cd /tmp/initrdproject/initrd/modules
7) gunzip < modules.cgz | (cd /tmp/initrdproject/modules && cpio -idv)
8) cp your driver, in my case r8168.ko: cp /somedir/r8168.ko /tmp/initrdproject/modules/2.6.18-53.1.14.el5/x86_64
9) verify your r8168.ko has the right attrib, if not, chmod 744 r8168.ko
10) cd /tmp/initrdproject/modules; find 2.6.18-53.1.14.el5 | cpio -ov -H crc | gzip > modules.cgz
11) copy back modules.cgz to replace the old one: cp /tmp/initrdproject/modules.cgz /tmp/initrdproject/initrd/modules
12)cd /tmp/initrdproject/initrd/modules, change module configuration files as following steps
13) edit module-info, add
r8168
eth
"RTL8168/8111 Gigabit Ethernet"
14) edit modules.alias, add
alias pci:v000010ECd00008168sv*sd*bc*sc*i* r8168
15) edit pci.ide, find 10ec Realtek ...., and add
8168 RTL8168/8111 Gigabit Ethernet
16) ok, pack things back now.
cd /tmp/initrdproject/initrd
find . | cpio --create --format='newc' > ../newinitrd
cd ..
gzip <> initrd.img
17) copy initrd.img back to replace the origin initrd.img (don't forget to backup).
Monday, October 13, 2008
Linux: update drivers
To save the current ramdiscimage and make a new one:
> mv /boot/initrd.img-`uname -r` /boot/initrd.img-`uname -r`.old
> mkinitramfs -o /boot/initrd.img-`uname -r`
Thursday, October 2, 2008
RAID configuration
For soft-RAID, you can skip and boot Linux directly.
The general procedure is 1) to add the drive to the RAID array 2) to reshape the data distributed.
In Linux, use commands like
What is SELinux (Security-Enhanced Linux) ?
Wiki: Security-Enhanced Linux (SELinux) is a Linux feature that provides a variety of security policies, including U.S. Department of Defense style mandatory access controls, through the use of Linux Security Modules (LSM) in the Linux kernel. It is not a Linux distribution, but rather a set of modifications that can be applied to Unix-like operating systems, such as Linux and BSD. Its architecture strives to streamline the volume of software charged with security policy enforcement, which is closely aligned with the Trusted Computer System Evaluation Criteria (TCSEC, referred to as Orange Book) requirement for trusted computing base (TCB) minimization (applicable to evaluation classes B3 and A1) but is quite unrelated to the least privilege requirement (B2, B3, A1) as is often claimed.[citation needed] The germinal concepts underlying SELinux can be traced to several earlier projects by the U.S. National Security Agency.
SELinux and Intel Fortran/C compilers
A recent problem is the program stopped after running for a couple of hours, only reporting page errors in /var/log/messages. The system sometimes crashed. After I disabled the selinux, everything is fine.
SELinux has restricted certain access to shared libraries. You can configure it to allow the access to shared libraries. In Fedora Core, you can bring up "system-config-security". If you feel that the computation stability is of the first priority or your computer is well protected(such as nodes in a cluster), you can simply disable SELinux.
Friday, September 26, 2008
Bargain workstations available: MSI introduced a 8DIMM motherboard for Core 2 Quad/Dual systems
Estimate the cost for a workstation with 16GB memory:
1) get this motherboard for $160
2) CPU, recommand the 1333MHZ core 2 Quad Q9550 ($300) or Q9650($500). 1666Mhz is still very expensive right now.
3) P-45 only supports DDR2 to 16GB while 8GB max for DDR3. Currently, DDR2-1066 only has 1GB/DIMM avaiable. We have to pick DDR2-800 8x2GB: around $300.
4) hard drive: depends, let bugget $150 for a 1TB SATAII drive.
5) a cheap graphic card and computer case around $100.
The total cost is around $1000. Wowwwww
Thursday, July 17, 2008
Ultimate pocket gadget: Iphone, Windows Mobile, or Nokia Tablet
OK, I have owned a blackberry, Nokia internet tablet, ATT 8525 Windows Mobile, but I still want an iphone. Here's the story.
What do you want to do with a pocket electronic gadget?
1) communication: to make phone calls, internet chat, messaging, email
2) basic internet surfing, such as checking news headline, weather, traffic, googling
3) maps, GPS is a plus
4) multimedia, such as watching videos,listening to music
5) personal organizer, such as addressbook, calendre, to-do list
6) gaming
7) E-book reader
Let one first review all these products.
Wednesday, July 16, 2008
Connecting SATA disk array
1) use sata multilane: check this guide. Basically, you can connect four sata drives to four sata ports in your computer with a single sata multilane cable(bridge).
2) use sata port multiplier, check this guide Theoretically, it is possible to hook up 15 sata drives to one sata port on your computer(motherboard or PCI sata adaptor) with port multiplier. Yet, they have to share 3Gbps band width. Actually, commercial SATA disk arrays use port multiplier. Check addnonics as an example: it has internal/external 5x1 port multiplier which allows 5 sata drives on one sata/eSATA port.
3) commercial enclosures can also provide interfaces such as Fiber Channel, SCSI, SAS and Infiniband. Check out some commercial products, such as Sans Digital.
FAQ:
1) how to get an eSATA port?
You can use a SATA to eSATA converter or get an eSATA PCI adaptor.
Disk storage solutions for workstations
Let me first explain some of the terminologies
1) the type of physical hard disks
Desktops and workstations usually use 3.5in hard disks, which come in the following interfaces:
- a) Ultra-ATA(parallel Advanced Technology Attachment, also known as IDE or EIDE) drives. Ultra-ATA 100 supports the transfer rate of 100M/s and has the capacity as large as 750GB for a single drive. These are used in old desktops, and have been replaced by SATA drives for better performance. Price: 750G for $120.
- b) SATA(serial-ATA) drives. Currently, SATA-II(or SATA-300) supports a transfer rate of 300M/s (raw bandwidth 3G/s) and the capacity as large as 1TB (Seagate will release a 1.5TB drive soon). Price: 1TB for $200.
- c) SCSI(Small Computer System Interface) drives. Most commonly ones found on market is Ultra-320 (supports 320M/s) and 300GB in capacity. Price: 300GB for $200.
- d) Fiber-channel drives. Common ones on market are FC-AL (Arbitrated Loop) 2G/s (200M/s transfer rate), 300GB for $585.
- e) SAS (Serial Attached SCSI), current 3Gbps models support transfer rate of 375M/s. Price 300GB for $188.
- f) Infiniband, this is relatively new and rare and extremely expensive.
2) Connection type
- a) external or internal: usually the desktop computers and workstations have limited space inside the main case, limited power connectors, motherboard connectors which limit the number of hard drives put inside. For instance, for normal desktops, 4 sata drives are usually at its maximum. Supermicro workstations can put 8 drives inside. So, if you want bigger storage, an external disk array (including rackmount) is recommended. If we choose an external array, all you need is a (external) connection port from the main workstation/server. You then need a PCI adaptor if the motherboard doesn't come with one.
- b) connection bus. Besides the type of drives mentioned above, we can also connect the external drives with FireWire or USB. The number of drives and the connection speed is summarized in wikipedia, and is copied here:
| Name | Raw bandwidth (Mbit/s) | Transfer speed (MB/s) | Max. cable length (m) | Power provided | Devices per Channel |
|---|---|---|---|---|---|
| SAS | 3000 | 375 | 8 | No | 4 |
| eSATA | 3000 | 300 | 2 with eSATA HBA (1 with passive adapter) | No [11] | 1 (15 with port multiplier) |
| SATA 300 | 3000 | 300 | 1 | No | 1 (15 with port multiplier) |
| SATA 150 | 1500 | 150 | 1 | No | 1 per line |
| PATA 133 | 1064 | 133 | 0.46 (18 inches) | No | 2 |
| FireWire 3200 | 3144 | 393 | 100; alternate cables available for 100 m+ | 15 W, 12–25 V | 63 (with hub) |
| FireWire 800 | 786 | 98.25 | 100[12] | 15 W, 12–25 V | 63 (with hub) |
| FireWire 400 | 393 | 49.13 | 4.5[12][13] | 15 W, 12–25 V | 63 (with hub) |
| USB 2.0 | 480 | 60 | 5[14] | 2.5 W, 5 V | 127 (with hub) |
| Ultra-320 SCSI | 2560 | 320 | 12 | No | 16 (HBA is a device) |
| Fibre Channel over copper cable | 4000 | 400 | 12 | No | 126 (16777216 with switches) |
| Fibre Channel over fiber | 10520 | 2000 | 2–50000 | No | 126 (16777216 with switches) |
| Infiniband 12X Quad-rate | 120000 | 12000 | 5 (copper)[15][16] <10000> | No | 1 with Point to point Many with switched fabric |
OK, we can decide what kind of storage system is good for us. Infiniband, Fiber-Channel, SAS are relatively new and expensive. The common solutions currently are either SCSI or SATA. SCSI has been tested for more than 20 years for its reliability and availability. Many businesses still prefer SCSI for mission critical appliations. SATA drives are relatively new. But due to its price and performance, it has gained more commercial market. In another aspect, external SATA 3.0Gbps drives may be connected to SAS backplanes, or Firewire, Infiniband buses.
I will prefer SATA drives because 1) it's big (1TB each drive); 2) it's cheap; 3) the flexibility of connections. I will focus on SATA drives below.
If you want to put SATA drives inside the workstation, notice that normal motherboard only supports 4-6 SATA ports, you will need another SATA adaptor or port multiplier(can also mounted as a PCI card). Also, there are limited SATA power connectors. You can buy IDE to SATA power connector with splitters(usually a few dollars). But make sure that you have a big power supply.
For external drives, there are commercial disk arrays which comes with either eSATA, ethernet, SAS, Firewire, USB interfaces. If speed is not the first priority, for instance, backup devices, you can take Firewire, USB, or ethernet interfaces. Otherwise, you want these external drives run as fast as internal drives, choose eSATA or SAS.
I will discuss how to connect SATA arrays in next blog.
Tuesday, May 27, 2008
Ubuntu installation
1) add a Medibuntu repository, including many commerical softwares which ubuntu cannot include in their own repositories, such as acroread, skype, mplayer. Check the method here. For instance, for 8.0.4(hardy),
Ubuntu 8.04 "Hardy Heron":
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
Then, add the GPG Key:
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get updatethen you can use "sudo apt-get install acroread" to install the adobe acrobat reader, as well as its mozilla plugin.
2) install LaTeX
sudo apt-get install tetex-base tetex-bin tetex-extra
3) install emacs, gnuplot, grace ....,
Some problems:
1) for nvidia graphical cards, the system will prompt you to install an enhanced driver nvidia-glx. However, there's a bug which messes up with your LCD monitor refresh rate. A temporary solution is to edit /etc/X11/xorg.conf, in Device section, add
Option "DynamicTwinView" "false"
Sunday, May 25, 2008
Leopard: how to fix the pdf fonts problem in preview
To delete the ATS cache folder for the current user:
sudo rm -rf `lsof | grep com.apple.ATS/annex.aux \
| grep Finder | cut -c 66-139`
To delete the ATS cache folder for all users:
sudo rm -rf /private/var/folders/*/*/-Caches-/com.apple.ATS
After running this script, the machine should be restarted so that the caches can rebuild.
This solution is from http://www.macosxhints.com/article.php?story=20071026081555971
Tuesday, May 20, 2008
Computer Deals
- Pricewatch.com : gives you an impression that normally how much it will cost.
- Looking for deals, there are a lot of websites listing the some bargains, such as dealsea.com, ableshoppers.com.
- Pricegrabber.com, google shopping, yahoo shopping are good resources for comparing prices online.
- You can check spoofree.com, shoplocal.com for local store specials. For instance, I like to shop at Fry's a lot, check their weekly newspaper ads here.
Convert a fat32 partition into ntfs
- open a terminal (command prompt) from "Run"->"cmd"
- let's say, drive D is in fat32 format and you want to convert it. Use "vol d:" to check the volume name.
- Use "convert d: /fs:ntfs" to convert. You will be asked for a volume name: you can either use the old name or pick a new name.
- Wait for the conversion to be completed.
- Although it's usually flawless (without losing any files) for this procedure, you are advised to back up your data in that drive before the conversion for secure purposes.
Friday, May 16, 2008
Upgrade your hard drive: procedures and problems
The question here is how you can make a "TRUE COPY" of your old hard drive to the new drive.
I will share my experience in upgrading a Lenovo Thinkpad T61 with Windows XP installed.
1) Buy a new hard drive.
You have to figure out the exact model that your computer supports. For instance, interface (EIDE or SATA), size (2.5", 3.5" ...).
For T61 or most current-day laptops, find a 2.5" SATA drive. Actually, I purchased a portable external drive (for instance, Maxtor OneTouch 4 mini). The benefits of the external drive are: a) you can firstly plugin to copy the hard drive; b) after switching drives, you can still use the old drive as an external storage.
2) Hard drive copy: copy all partitions in the old drive to the new one.
Method: a) direct partition to partition copy; 2) backup your drive into an image and then restore the image to the new drive.
Software: there are many commercial products, such as partition magic, Norton Ghost, ... I picked a free software called Disk Copy (Supports IDE, SATAI, SATAII, SCSI, Firewire(IEEE1394) and USB drives). Another software I want to mention is Gparted, which is included in the Ubuntu installation and live CD.
3) Procedure:
- download Disk Copy from here, and burn it into a CD.
- keep the old drive your laptop and plugin the external hard drive (USB).
- boot the Disk Copy CD.
- You have the optional for "Disk Copy" or "Partition Copy". I pick Partition Copy
- Pick the source(from the old drive) and the destination(from the new drive) partition. If you pick the destination in an existing partition in the new drive, the existing parition will be deleted and a new partition will be created with the same size as the source partition ( the rest will be left as unallocated space. If you pick the destination from a unallocated space, then a new partition is created.
- Copy ....... The speed of copying is 800MB/Min ( I guess it's limited by the USB connection speed). Since it does a sector to sector copy, a 80GB partition will cost around 100 mins.
- Repeat the above procedures for all partitions you want to copy.
- Shutdown the computer, switch the hard drive.
- Turn on the computer with the new drive, cross your fingers ......
PROBLEM
All right, my copy of the Windows XP doesn't boot normally; it hanged on the booting screen with Microsoft Windows XP logo.
Problem: I reinserted the new hard drive into the enclosure and read the boot log from another computer; discovered that the device drivers are loaded OK but then the computer tried to load files from "E:\Windows" instead of "C:\windows". OK, I realize that XP "thinks" the new drive as another drive.
Solution: change the drive letters. This can be done by changing the registry table "HKLM\System\MountedDevices\DosDevices\C:".
How can you edit the registry table without being able to boot into the system?
I found one tool named Offline NT password and registry editor. It's a bootable CD which boots into a program in a Linux envoinment. The problem allows you to change certains things on your Windows 2000/XP/NT systems, such as registry table, passwords(!).
Procedure to fix my problem: the registry table editor in ntpasswd works prefectly on HKLM\Software, but not always on HKLM\System. For instance, I cannot write back as "/Windows/System32/Config/System is read-only".
- create the ntpasswd CD.
- boot the CD with the new drive in the laptop and an external drive (for instance, a USB pen drive).
- follow the prompt of the CD, pick "system" and use option "9-registry editor"
- use "?" to find a list commands in the editor. you can "ls" to list; "cd xx" to enter a subkey.
- ok, I use "cd MountedDeives". but then i cannot edit the value for "\DosDevices\C:". So i deleted all of \DosDevices. the idea is that i cleared all the drive letter assignments, in the next boot, XP will try to reassign drive letters, and hopefull get it right(indeed it worked !). The command to delete a key is "dv xxx".
- all right, press q to quit and quit. It then prompted you to write the modified registry table back. But it failed as I mentioned "/Windows/System32/Config/System is read-only".
- after the failure, the ntpasswd exited to a linux prompt.
- mount the USB drive, for instance "mount -t vfat /dev/sdb1 /mnt".
- the modified registry file is in "/tmp". So, "cp /tmp/system /mnt".
- shutdown the computer.
- put the (new) hard drive into the enclosure and plug into another (bootable) computer together with the pen drive. Now copy the "system" file in your pen drive to the (new) hard drive "Windows(or Winnt)\System32\Config", replace the old "system" file(you can make a copy).
- Now, insert the (new) hard drive back into the computer. Boot up, .... magic happens|
Saturday, May 10, 2008
LaTeX resources
LaTeXing in Microsoft Windows
- TeX system:
- Editor:
- WinEdt, pretty good but not free
- Texmaker, similar to WinEdt and is free, recommended
- Emacs for Windows
- Lyx, TeXmacs, two free WYSIWYG-tyle editors. They are developed for Linux systems, but now also available for Windows through Cygwin. You can either install Cygwin or download separate packages including cygwin utilities.
- Bib manager:
- TeX for Powerpoint:
LaTeXing in Mac OS
There are already many helpful websites about installing TeX on Mac OS X, for example,
my preferences are
- i-Installer, for TeX system and required utilities
- TeXshop, for Editor
- LaTeX Equation Editor for TeX in powerpoint
Friday, May 2, 2008
Linux Clustering softwares
- UniCluster Express from grid.org
- OSCAR | Open Source Cluster Application Resources
Of course, they are a lot of commercial versions, such as
- SCALI higher performance computing (MPI Connect)
- Scyld ClusterWare™ HPC
Deals on Lenovo computers from Contractor Purchase Program
http://www.lenovo.com/cpp with passcode 556655.
The R61 series start from $455.79.
The T61 series start from $631.74.
The X61 series start from $870.18,
as listed today. They are 10-40% cheaper than the regular lenovo website.
Thursday, May 1, 2008
MacOS/WinXP dual system clock errors
When you have both Mac OSX and Windows XP/Vista on your computer, you will notice that the clock will change when you switch between two systems. This is due to that Mac treats the hardware clock(shown in BIOS) as GMT time while windows treats that as local time. The solution is then to make them agree with each other.
To make Windows take GMT time
Create a file, for instance, clockfix.reg, as
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] "RealTimeIsUniversal"=dword:00000001
and run it (by double-clicking).
To make Mac OSX use local time
First you'll need to add a line to /etc/rc.local:
date `date -u +%m%d%H%M%Y`
And to /etc/rc.shutdown.local you'll need to add this:
date -u `date +%m%d%H%M%Y`
Update: for leopard (10.5.x), the above method doesn't work. Please follow the instruction in this link.
Wednesday, April 30, 2008
How to create a Windows XP SP3 installation disk
Procedures:
1) copy all files in the original installation to hard drive, for instance, C:\XPSETUP
2) download the sp3. Let's say the name is sp3.exe
3) in a terminal command prompt( for instance, by running cmd from Start->Run...), run
"sp3.exe /integrate:C:\XPSETUP"
4) find a boot disk for windows XP, for instance, w2ksect.bin in wxp10.zip. (OK, this one doesn't work. Another method is to download ISO buster and use it to extract the bootdisk image from the original installation CD.)
5) in C:\XPSETUP, you may notice files names "WIN51", "WIN51IC.SP2". Make a copy of "WIN51IC.SP2" and rename it to "WIN51IC.SP3".(it actually has been automatically created by the integrate process!)
6) burn CD with your favorite burning software. For instance, I use Nero. Create a bootable CD, set the boot image file, create a label like WXPSP3HOME, pick data mode 1, ISO9660+Joliet, move all contents in C:\XPSETUP to the target CD project. And, burn!
Windows XP service pack 3
Yet, there is a direct link for downloading SP3 leaked, named windowsxp-kb936929-sp3-x86-enu_c81472f7eeea2eca421e116cd4c03e2300ebfde4.exe. According to microsoft website, kb936929 is Release Candidate 3 version. I believe this is the final release version.
OK, I have downloaded and installed it on my laptop. It was smooth and no problems met. Indeed, I can feel the computer runs faster than before. So, upgrading to SP3 is highly recommendated.
Friday, April 25, 2008
Build lapack with gfortran
- download the source package from netlib.org: lapack.tgz
- in a working directory, use "tar zxvf lapack.tgz" to unpack.
- "cd lapack-3.1.1"
- "cp INSTALL/make.inc.LINUX ./make.inc"
- edit the file make.inc, change the compiler g77 to gfortran
- "make blaslib"
- "make lib"
- if you want to compile and run the rest routines, run "make all"
- copy the generated library files *.a into a directory where you keep lib files, for instance $(HOME)/lib
Thursday, April 24, 2008
Tablet PC, your next laptop!
- You can hold a LCD just as holding a book, reading articles, surfing webs just with your fingers.
- Taking notes on your computers, especially, with heavy math formula, chemical symbols, musical notes, or any graphical objects.
- Giving interactive lectures or presentations: you can write on a computer(via a projector) the same way that you write on a blackboard, while you can pull out any multimedia objects for demonstration.
- Painting on LCD screens just as painting on papers.
- Listening to music or watching movies the same way you are using an IPOD touch
With the invention of active digitizer(compared with the conventional passive digitizer relying on pressures), writing on computers are much more easier and with much better accuracy. Buy Wacom stocks! (Can anybody tell me how I can buy stocks from Japanese stock market directly?)
Tablet PCs usually cost around $2000, beyond the reach for normal users. HP has introduced a budget tablet PC, tx2000 series (from the modification of the previous 1000 series). You can purchase a tx2110US model for $899 at Office depot this week. So, I believe the hardware cost is already within the range, and I believe by the end of this year, every PC manufacturers will have their budget tablet PC models. But the question is, whether the software companies are ready?
My comments:
- Apple has already successfully introduced the touchscreen on iPhone and done many good things. I am looking forward to the Mac Tablet: 1) Apple appears to have the ability to do things right. For example, there were already so many manufacturers for MP3 players before IPOD but none can be compared with IPOD. 2) Apple's "imaginative" realization that, you can use two fingers to magnify or shrink the screen. Yes, we (most) have ten fingers, which should be much more flexible than a mouse. I believe that the next patent will be filed on using more fingers and the combination of fingers and a digital pen.
- Microsoft is everywhere. Unfortunately, perfection is what it lacks. It already has several softwares for touchscreens and digitizer pens, such as Math journal( it's free, which is a rare thing for Microsoft). But they are just usable. Come on, do something better than that! Don't wait until Apple has done it again!
- Tablets will greatly affect the orgnization of web pages and web applications. They will be more "finger"-friendly, at least, some bigger touchable items for easy browsing with fingers.
How to build a budget Linux cluster for scientific computation
Here I share my recent experience in building a budget linux cluster, with
Hardware:
- CPU: Intel Quad Core Q6600 (2.4GHz) , ~$300 with motherboard combo sale at fry's. It is expected that Intel will cut the price soon and Q9450 would be a better choice. I would not recommend AMD opetrons and Intel Xeon series as they are overpriced, unless 1) you are running enterprise servers and seeking better stabilities; 2) you want to install more than 8G memory on each node.
- Motherboard: I used ECS GM-33T which includes onboard gigabit network adaptor and video card and supports 4 DIMM memories up to 8G. Pay attention to that current motherboard chipsets only support unbuffered non-ECC memory up to 8G( a variation of NVidia chipset can support 16G, but there are no 4G/DIMM memory on the market). But GM-33T doesnot allow overclocking Q6600 as this CPU is not designed for overclocking. However, there are reports that with another motherboard, one can overclock Q6600 to 3.4GHz without generating any overheat or causing any system instability.
- Memory: I installed 4x2G DDR2-667 memories dimms, which cost around $160-200 at fry's.
- Hard disk: 320G SATA disk costs $70 at fry's which is adequate for a node. For the headnode, you can pick, for instance, a 1TB for $200, or two of them for backup.
- Case: I picked a $35 PC case. If you want to save space, you can buy a rackmount case which is available for $200(for instance, 2U).
- Network: if you don't have heavy parallel jobs, a gigabit ethernet connection is adequate. Since the motherboard already has an onboard ethernet adaptor, you only have to purchase an extra network adaptor for the master node(for connection to WAN) and a gigabit network switch(the number of ports depends on how many nodes you are building).
- DVD drives are optional, as you can always connect an external one when installing the operating system.
- Operating system: I picked Fedora Core 8 x86_64 for the available software packages and amazing promptness of software updates. Of course, you can pick any one of your favor. For instance, CentOS(same as RedHat Enterprise server), SuSE, Ubuntu, Debian ...
- Clustering software: I picked OSCAR (open source clustering application resources), which includes almost everything you will need for scientific computation, for instance, job scheduling(open-pbs, maui), parallel envionment(MPI, LAM). The latest release version (5.0) only supports Fedora Core up to 5 . However, there are nightly builds for newer versions of Linux http://oscar.openclustergroup.org/filebrowser/49/branch. In my installation with FC8, I find a lot of problems. If you are not very confident about your Linux skills, please go with Fedora Core 5 or CentOS 4, and intall the released version of OSCAR. Of course, you may face the problem that the old version Linux may miss the device drivers for your new computers. But I judge that it's easier.
- Compiler: MPI compilers come with OSCAR is adequate. For single-node computations, Intel C++/Fortran compiler is free for non-comercial purposes. It's much better than GNU compilers.
- I will blog later on the details of software installation.
Tuesday, April 15, 2008
How to change the default paper size in LaTeX
The default paper size coming with every latex system, including MikTex, teTex, Mac versions is A4. If you want to change it to letter, please follow these steps,
- If you are using an old version(not pdfetex), or, you are still using dvips, dvipdf to create ps(pdf) files, you need to change the following files.
For dvips, edit $TEX/texmf/dvips/config/config.ps, find@ A4size 594.99bp 841.99bp
you can either comment them by adding % in front of the lines, or move these lines behind the letterSize section.
@+ ! %%DocumentPaperSizes: a4
@+ %%PaperSize: A4
For dvipdf, edit $TEX/texmf/dvipdfm/config/config, find% Set default paper size here
change a4 to letter
p a4 - If you are using pdflatex, depending on the specific version of TeX, you will need to edit either $TEX/texmf/pdftex/config/pdftex.cfg or $TEX/texmf/tex/generic/config/pdftexconfig.tex. Change pagewidth to 8.5 true in; pageheight to 11 true in.
However, I found for some systems, manual changes don't work! In these cases, you should run texconfig (or similar configuration program in MikTeX, gwTeX) to change the default paper size. It will create a personal configuration file in your home directory.
Intel Fortran Compiler: Selinux and libifcore.so.5 conflict
if you compile with the option "ifort -O3 -xT -mcmodel=medium -shared-intel xxxx.f90", the executable will have a problem : "./a.out: error while loading shared libraries: /opt/intel/fce/10.1.008/lib/libifcore.so.5: cannot restore segment prot after reloc: Permission denied.
This is due to that SELinux has disabled the use of shared libraries with text relocation. The solutions are 1) to disable SELinux, 2) for the specific lib, for instance, libifcore.so.5, use "chcon -t textrel_shlib_t /opt/intel/fce/10.1.008/lib/libifcore.so.5".