Tag Archive for 'linux'

Adding git-svn support from source

Having workstations where you don’t have root access either means contacting support for installation or building your own software from source to get the latest version.

I started using git for code produced in my work. The build was successful with a simple “./configure; make ; make install” series of steps except for supporting access to subversion repositories. It was looking for the perl module SVN::Core to be able to function successfully. Googling about it will land you to the Alien::SVN CPAN module page. Its dependencies can be installed with the standard “install Module::Name” invocation in the CPAN shell. But the main package does not properly install in this environment. It is probably because of the tarball not containing the standard Makefile.PL. It has Build.PL instead. This script generates the Build that compiles the subversion library and its bindings. Then it generates a Makefile from Makefile.PL in the src/subversion/subversion/bindings/swig/perl/native directory. Below is the output of the script:

[Alien-SVN-1.4.6.0]$ ./Build
Running make
Running make swig-pl-lib
make: Nothing to be done for `swig-pl-lib'.
Running /usr/bin/perl Makefile.PL INSTALLDIRS=site
Writing Makefile for SVN::_Core
Writing Makefile.client for SVN::_Client
Writing Makefile.delta for SVN::_Delta
Writing Makefile.fs for SVN::_Fs
Writing Makefile.ra for SVN::_Ra
Writing Makefile.repos for SVN::_Repos
Writing Makefile.wc for SVN::_Wc
Running make
gcc -c  -I/home/aespinosa/local/include/apr-0
...

The command /usr/bin/perl Makefile.PL INSTALLDIRS=site generates a build environment to install in /usr. This is not favorable for installation in userspace since you do not have permission to write on that directory. So this command will be rerun /usr/bin/perl Makefile.PL PREFIX=$USERDIR, where $USERDIR is the destination directory you want to.

Now you can successfully clone subversion repositories!

Blog Traffic Exchange Related Posts
  • wipas: site view 1WIPAS propagation studies Classes have been suspended for three consecutive days due to heavy rain. At last I can slack off preparing for class and concentrate on the other side of academic work: research. The ECCE Department is very interested in studying its properties in the context of Philippine tropical rain. We have......
  • My CodeInvaders strategy There has been a few requests in my previous entry for the MySpaceship.java implementing my strategy.  It was a very fulfilling experience that someone has need for my some of my work even though it was a simple demo for my AJSS computer programming workshop class.  The code can be downloaded......
  • Deriving Equations for School Administration One monday, I represented the student body in lieu of Charles, the COA president. The agenda was about MVP rules and guidelines. An issue was raised about the noised levels. As the science major and head of the science guild, I thought that the rule of benchmarking permits with a......
  • blog pag backgroundWeb2.0-generated wallpapers [caption id="" align="aligncenter" width="450" caption="Blog page background header"][/caption] I decided to create a backround header image for my blog and Multiply page. Tons of randomly writter equations would be nice to have. The Yahoo Image search allows you to specify if you the types of pictures you want like black......
  • 6 driver hotswap bayBuilding a 1.2 Terabyte server At last after several months of processing paperwork through the Purchasing Office, our 1.2 terabyte Beowulf cluster server has finally arrived! This will be used to replace our recently decommissioned Beowulf cluster deployed last 2001. It will serve the scientific community of Ateneo de Manila for various numerically intensive......
Blog Traffic Exchange Related Websites
  • The Bug Desk [caption id="" align="alignleft" width="300" caption="The Bug Desk"][/caption] About the Bug Desk An excellent choice for a computer workstation the Bug Desk's main surface has plenty of room for a monitor while a pull-out tray keeps your keyboard handy. Two smaller shelves above can hold speakers or framed photographs. Keep books......
  • shattered_hard_driveBe Prepared, Backup Your Data For most people these days our computers are our lifelines, our stories, our history. It used to be that people would record their photos in albums bound and put on a shelf. We would maintain our check registers, in the actual register. We kept track of our accounts and our......
  • My Kubuntu workstation Start with Kubuntu (Breezy) full installation (not the reduced server option).Install synapticAdd universe and restricted repositories.Install firefoxkwin_baghira window decorations and button styles.Install kxdockerEnable dapper repositories. Perform an apt-get dist-upgrade Install gvim. Allow incoming connections (remove -nolisten tcp)For kubuntu, this is on the ServerArgsLocal line in /etc/kde3/kdm/kdmrcInstall mypasswordsafeSet up to mount......
  • Buying Guide to Dobros - Wooden Resonator Guitars Consult different buying guides for buying a Dobro, and you will find yourself getting different opinions from different people. Dobros are wooden body resonator guitars, which are a unique piece of musical history and an intriguing instrument for you to play. These Dobros do not have to be expensive, as......
  • T. Boone Pickens - more power lines needed for wind The Senate Committe on Energy and Natural Resources held hearings on the energy crises the other day, and T. Boone Pickens once again had some interesting things to say." According to this article in the Washington Times, Mr. Pickens says that America can curb its dependence on foreign oil by......

Unix timer utility

Timer microbenchmark

Timer utilities performance on C and Perl of "echo -n"

The Unix time(1) command can only give a precision of 10 milliseconds by default. But being the engineer who goes insane after precision, I made my own script to be able to get differences in terms of microseconds. My first timer utility was made in C but I got stuck with the insane exec(3) family of functions since you need to fork the process to a child for the parent process to create successful timing. Hence I used Perl with the Time::HiRes library which is a wrapper to <time.h> and <sys/time.h>. Later on, I found out that C itself has the system(3) functioin in <stdlib.h>

Performance-wise you can see that C has a much faster runtime when the program was being invoked. But you can see in the graph above that Perl has much more consistent values so its standard deviation is lower than C. When I tested both programs for my data-intensive computing experiments, I get better results with the Perl utility! Perhaps I forgot to do all the magic the system function in Perl does in my C implementation?

Here is my Perl code:

#!/usr/bin/perl

use Time::HiRes qw ( tv_interval gettimeofday );

$start = [gettimeofday];
system @ARGV;

$elapsed = tv_interval ( $start );
print $elapsed, "\n";

Here is my C implementation:

#include <stdlib.h>
#include <stdio.h>

#include <time.h>
#include <sys/time.h>

int main(int argc, char* argv[])
{
	struct timeval start, end, diff;
	gettimeofday(&start, NULL);
	char* command = malloc( sizeof(argv) );
	int i;
	sprintf(command, "%s", argv[1]);
	for( i = 2; i < argc; i++ )
	{
		sprintf(command, "%s %s", command, argv[i]);
	}
	system(command);
	gettimeofday(&end, NULL);
	timersub(&end, &start, &diff);
	printf("%d.%06d\n", diff.tv_sec, diff.tv_usec);
	return 0;
}
Blog Traffic Exchange Related Posts
  • On iPods and being struck by lightning... I just arrived in our department from a VoIP appreciation seminar in the Advanced Science and Technology Institute (ASTI). Sir Paul, our secretary said that Dr. Toby Dayrit (the Dean) is looking for some faculty in the ECCE department to explain the relationship of the probability of being struck by......
  • Design and engineering of a supply chain management system for drug delivery applications Day 2 of the 8th Philippine Computing Congress. I presented our deparment's work on wireless logistics. It is a project commissioned by the Tropical Disease Foundation to monitor TB drug deliveries around the country.Title: Design and engineering of a supply chain management system for drug delivery applicationsAuthors: A. Espinosa, N.......
  • ICT4Health2008: Session on Medical Imaging, Instrumentation and Informatics I will be facilitating/ moderating the second session of the International Symposium on ICT for Health. It will feature paper presentations on Medical Imaging, Instrumentation and Informatics. Below is the schedule of presentations and their titles: 3:15pm - 3:45pm : J. Liu, J.H. Lim, D. Racoceanu, W.W.K. Damon and H.......
  • ICT4Health2008: Session on Medical Imaging, Instrumentation and Informatics I will be facilitating/ moderating the second session of the International Symposium on ICT for Health. It will feature paper presentations on Medical Imaging, Instrumentation and Informatics. Below is the schedule of presentations and their titles: 3:15pm - 3:45pm : J. Liu, J.H. Lim, D. Racoceanu, W.W.K. Damon and H.......
  • Great Chicago Book Sale I quickly grabbed my bike after coming from a seminar class and arrived 10 minutes before the closing time! Within a short span of time and by relying on my semi-rare impulsiveness of buying, I got these two titles foer 5 USD (buy-one-take-one): W. T. Welford, Useful Optics (Chicago Lectures......
Blog Traffic Exchange Related Websites
  • The US Braces for the Diesel Hybrid Congress has made a offer to car manufacturers which has the auto makers scrambling. They are working to create a short term plan for the release more fuel efficient vehicles into the market in order to help reform the energy situation in the US. This will give automakers aid in......
  • Online Auto Loans For You Buying a car used to mean long waits in the dealership and waiting for a loan. The process was tedious and boring, but inevitable. Now, however, the internet offers an escape from this procedure. It's become easy to get your auto loans online. Instead of having to sit around, waiting......
  • Hydrogen generator that increases MPG being tested in San Antonio Researchers at the Southwest Research Institute in San Antonio are testing a water fueled hydrogen generator that could be used with standard gasoline engines to increase mileage.  The hydrogen generator, created by Steve Gerhlein, an auto mechanic in San Antonio , has installed a system in his cars that generates......
  • Canon EOS 450D / Digital Rebel XSi Just around two weeks of buying my XTi Canon unveiled its new entry-level dSLR that will replace Canon 450D / Digital Rebel XTi. as usual, the best review can be found at dpReview.com only if I was somewhere else, I'd be able to return some bucks or even pay little......
  • Ready for a vacation I'm usually ready for a vacation, but lately the itch to go traveling has been worse than normal. I keep finding all these great deals to fabulous places and I want to go. Now! But I have to be patient, because at this point we don't have the time to......

Compiz’s Scale plugin in Hardy Heron

I recently upgraded my workstation and Asus EEE to Ubuntu 8.04. To save on screen space on my UMPC, the top button was set to autohide. The bottom panel was removed and replaced by the avant-window-navigator also in auto-hide mode so I can have larger window icons. The final step was modifying the behavior of the scale plugin to activate whenever I place my mouse cursor at the TopRight of the screen.

Compiz session activating the Scale plugin window picker

The Scale plugin of Compiz shows all the thumbnails of opened windows in the current workspace. It looks like something in Mac OS X. The screenshot below shows a sample activation of the Scale plugin window picker using the default Shift-Alt-Up:

To enabled the mouse gesture behavior of the plugin, simple open the gconf-editor program and go to /apps/compiz/plugins/scale/allscreens/options. The initiate_edge name-key pair is by default set as an array so that you can combine multiple-key definitions like Ctrl-Alt-BottomRight. But indicating only a mouse gesture does not work. The workaround I did was to unset the key. Aftewards, it will change from an array list into a text field. Then write TopRight or whatever mouse gesture you want to activate the window picker.

To unset the initiate_edge key-value pair, simple right click on the entry and choose the “Unset Key” option.

Blog Traffic Exchange Related Posts
  • My CodeInvaders strategy There has been a few requests in my previous entry for the MySpaceship.java implementing my strategy.  It was a very fulfilling experience that someone has need for my some of my work even though it was a simple demo for my AJSS computer programming workshop class.  The code can be downloaded......
  • Tweak your del.icio.us most visited sites The del.icio.us Firefox add-on provides very neat integration into the latest version of Firefox three. I like the synchronization between local bookmarks, shortcuts, etc. The "most visited" tab actually counts how many times you clicked a bookmark and updates the toolbar respectively. The only problem is that for private bookmarks......
  • New Phone: Motorla Razr V3r After several years, I dropped my Nokia 3315 phone for the last time.  The LCD got busted and the crystals were scattered all over the screen rendering it useless.  Theoretically it still works but you have to guess and interpolate what's happening inside the phone based on its initial power......
  • Tweak your del.icio.us most visited sites The del.icio.us Firefox add-on provides very neat integration into the latest version of Firefox three. I like the synchronization between local bookmarks, shortcuts, etc. The "most visited" tab actually counts how many times you clicked a bookmark and updates the toolbar respectively. The only problem is that for private bookmarks......
  • My CodeInvaders strategy There has been a few requests in my previous entry for the MySpaceship.java implementing my strategy.  It was a very fulfilling experience that someone has need for my some of my work even though it was a simple demo for my AJSS computer programming workshop class.  The code can be downloaded......
Blog Traffic Exchange Related Websites
  • Safari 4 Arrives Today was Apple's big World Wide Developer Conference which brought out several big news storied for Apple nerds like me. Among the new software and hardware announcements, Apple has brought Safari 4 out of beta and into full release. The browser is available for Mac OS X and Windows and......
  • Increase Productivity With These Automated Note Takers Jott.com My friend recently introduced me to Jott, which is a pretty cool idea that is currently in beta. Basically, you sign up for a new account on their website, give them your phone number and create a list of contacts that you call or email the most. Then, you......
  • Riverside Splash of Color Laptop Desk in Black [caption id="attachment_334" align="alignright" width="300" caption="Riverside Splash of Color Laptop Desk in Black"][/caption] Riverside Splash of Color Laptop Desk in Black One snappy little laptop desk creates a vibrant comfortable place to work. This computer desk features a laptop work surface behind the fall-front drawer. Perfect for small spaces at 36......
  • promote new blogHow To Grow A New Blog Efficiently This article contains some information and ideas that I have about how to grow a small or new blog efficiently. Unfortunately writing good content is not enough -- there are so many blogs out there that you have to do some extra work in order to get noticed. These ideas......
  • final-poster.jpgUnforgettable $25 Gift For Your Parents Or Friends. Trust me on this, it will be the best $25 you ever spent. I came across a post over at The Mike Matas Blog on how to make this huge poster from your own pictures: So I went ahead and made one for our office here at home. It is......

Rocks-4.3 kernel to support RTL8111b

To Beshr:

The vanilla install of Rockscluster 4.3 uses version 2.6.9-55EL of the linux kernel. Native support for the Realtek 8111B (r8168) did not come until 2.6.19.xx. I downloaded 2.6.23.13 from kernel.org. After rebuilding the kernel, you have to enable the kernel to map the hardware ID of the device to the correct module (r8169). Here is an archive of the files that I used to build the driver:

rocks-boot-drivers.tar.gz: I added the r8168 directory and modified the subdirs file to build this module for the kernel. It actually does not build anything since there are no entries in the SOURCE variable of the Makefile. Extract this tarball to your Rocks CVS tree ($ROCKS-SRC-ROOT/src/roll/kernel/src/rocks-boot/enterprise/4/images) The following entry was added to drivers/r8168/:

<br />0x10ec 0x8168 "r8169" "RealTek RTL8168B/8111B, RTL8168C/8111C Gigabit Ethernet controller<br />

Where 0×10ec 0×8168 is the hardware ID of my GigE controller.

Then I followed the instructions Creating a Custom Kernel RPM and Adding a Device Driver of the User Guide.

Good luck in building your cluster!

Blog Traffic Exchange Related Posts
  • Typhoon along the bayWhere do you get good news about the Philippines? I was hanging out with a couple of Pinoy immigrants when one of them said, "Sa Pilipinas wala nito no? (This does not exist in the Philippines, right?)" Of course there are a few grains of truth to it. But what disappointed and pierced me inside was that the......
  • Gutsy workstationUpgrading to Gutsy Gibbon A few weeks ago, I decided to upgrade my desktops from Ubuntu 7.04 Feisty Fawn to 7.10 Gutsy Gibbon. Using the upgrade instructions from the Ubuntu website, I used the network upgrade method for Ubuntu servers. I did not want to use the update-manager application to manage the upgrade because......
  • Nanay Delia learning a Point-of-Sale System for her Sari-Sari Store. Whatever doubts of the applicability of technology for the smallest unit of retail were laid to rest after the training session. The potential of becoming more efficient in pricing controls, inventory management, and accounting were key benefits that were very much appreciated. [description from Mark Ruiz blog.Technology for the masses' sari-saris The sari-sari store is a key economic and social installation in Filipino communities.  It allows the community easy access to basic good. The term sari-sari is Filipino for "various kinds".  See more from its wikipedia entry. Mark Ruiz of Hapinoy shares some updates on their company deploying a POS system......
  • ICT4Health2008: Session on Medical Imaging, Instrumentation and Informatics I will be facilitating/ moderating the second session of the International Symposium on ICT for Health. It will feature paper presentations on Medical Imaging, Instrumentation and Informatics. Below is the schedule of presentations and their titles: 3:15pm - 3:45pm : J. Liu, J.H. Lim, D. Racoceanu, W.W.K. Damon and H.......
  • Adding git-svn support from source Having workstations where you don't have root access either means contacting support for installation or building your own software from source to get the latest version. I started using git for code produced in my work. The build was successful with a simple "./configure; make ; make install" series of......
Blog Traffic Exchange Related Websites
  • The Good Human Gets Interviewed At TakePart Social Action Network. Thanks to Andy Kondrat over at TakePart, the Social Action Network, for interviewing me last month. In case anyone is interested, you can check out the interview at "Meet David: A Good Human from thegoodhuman.com". Most of you guys have probably figured a lot of this stuff out over......
  • Powerball AU 40 million Tonight's Powerball Jackpot of AU $40 million is the biggest ever offered on Australian Powerball. If one person wins the entire $40 million Jackpot, they will become Australia’s largest ever lottery winner! It is good value to have a go today, even if they are hard to pick. The Saliu......
  • Go-Fit Ultimate Pro Gym With DVD For those interested in resistance training, bands have become incredibly popular and for many, this is a great way to get fit. If you don't want to have to bother with clunky free weights, or your budget won't allow a weight machine, this little GoFit Ultimate ProGym with DVD......
  • Win Big with Jill Shalvis, HelenKay Dimon & Alison KentWin Big with Jill Shalvis, HelenKay Dimon, and Alison Kent It's real simple to enter for a chance to - simply spread the word! Go to the official contest page for more details. 2nd Prize books are: Instant Attraction by Jill Shalvis Get A Clue by Jill Shalvis Aussie Rules by Jill Shalvis Hot As Hell by HelenKay Dimon......
  • TurboTax Premier Online Giveaway Less than a month left until April 15th! In good news, TurboTax has given me 2 copies of TurboTax Premier Online to giveaway to my readers. This means you could win a chance to do your taxes for free and efile federally (not state) for free....

Realtek 8111B GE on Rocks 4.3

I am currently building a new Beowulf cluster using Rocks 4.3. It uses the linux kernel version 2.6.9-55EL. After building the master node, it is time to install on the compute nodes. In normal conditions where everything is smooth, the Rocks kickstart system boots the compute nodes from the network via a dhcp-tftp-kickstart combination. But our Rocks cannot load the network driver. Upon identification of the driver, I downloaded the Realtek 8111B (r8168) from the vendor’s site. I followed the instructions on how to add a custom device driver to the kernel in the rocks documentation. It basically creates an initrd.img file where the kernel modules is installed. But the boot sequence does not load the kernel module properly. I had a couple of email exchanges with Greg Bruno, one of Rock’s developers over the mailing list to diagnose the problem. But building a custom kernel module for the current kernel have not solved the missing module.

Upon further investigation, the driver for my NIC was incorporated into the r8169 module of the vanilla kernel. So I downloaded kernel version 2.6.23.13. First the kernel*.rpm packages must be built and installed in the /home/install rocks repository. Next, the rocks-boot package should be rebuilt in order to incorporate the new kernel. But since Centos uses an older version of the kernel, the hardware id of my NIC is not associated to the r8169 kernel module. So I created a dummy device driver in the rocks-boot repository. In the Makefile, I removed the source file to be compiled and simply added in an entry for my driver in the pcimap.

Now my compute nodes was able to grab the kickstart file and install an entire operating system in 10 minutes!

Blog Traffic Exchange Related Posts
  • AJSS: CodeInvaders! During the 2006 ACM-ICPC World Finals in San Antonio, Texas, there is an intermediate programming contest sponsored by IBM.  The Java Challenge showcases the latest offerings from IBM and try it out in a tournament style.  The name of the tournament was CodeInvaders.  It was released in the IBM AlphaWorks......
  • Introduction to SPICE: teaching demo I applied a couple of weeks ago to join the faculty of the ECCE Department in Ateneo de Manila. For my demo teaching class, I decided to give a short lecture on using SPICE for DC circuit analsysis of simple resistor networks.  Lecture Prerequisites:Familiarity with basic electronic concepts.  The topics......
  • vi-enabled toolsMy Vi-based tools Ever since I conquered the steep learning curve of the mode-based text-editing of vi (pronounced vee-eye), there is no other text editor for me. It completely binds my hands on the keyboard without the need to use the most (almost!). For those who are not yet into the religious practice......
  • links for 2007-11-08 Linux.com :: A killer app: PDF Editor Edit and annotate your PDF files without using expensive Adobe Acrobat tools (tags: pdf documentmanagement linux) flpsed - a Postscript and PDF annotator Converts PDFs to individual Postscript pages. Then using the application, you can annotate the document by overlaying texts. Good......
  • AJSS: CodeInvaders! During the 2006 ACM-ICPC World Finals in San Antonio, Texas, there is an intermediate programming contest sponsored by IBM.  The Java Challenge showcases the latest offerings from IBM and try it out in a tournament style.  The name of the tournament was CodeInvaders.  It was released in the IBM AlphaWorks......
Blog Traffic Exchange Related Websites
  •  GOM Media PlayerFree Alternative to PowerDVD and VLC Media Player - Play Broken AVI Files using GOM Player GOM Player is a freeware Video player for DVDs and other video files.  And it is best Free alternative to PowerDVD and VLC Media Player.  We all know about VLC Media Player. It is free and best open source Video player software. However VLC lacks while playing the some media......
  • creative commonsbrip blap getting zen things done photo credit: rovlls If you've been on the Internet for a few seconds, you've probably heard of the massively popular Getting Things Done. You may even have come across Zen To Done. I'm here to say that GTD is too complicated! Zen To Done is an improvement, but still......
  • ‘Mismatched kernel and HAL image’ Windows Error and Recovery HTML clipboard Windows Kernel sits between Executive and HAL (Hardware Abstraction Layer) and allows performing tasks like multiprocessor synchronization, trapping exception dispatching, initializing device drivers at bootup, interrupting, threading scheduling and dispatching etc. As a fact, all HAL implementations are dependent upon kernel in some manner. It implies that HAL......
  • tuxandgnuQuit Paying for What You Can Get for Free With the quality and quantity of Open Source and/or free products out there there is very little reason to pay for software that you can otherwise get for free. Another reason to to go Open Source is portability, If you have Mac OSX, Linux, and Window running in your home......
  • Rootserver kernel upgrading Last Update: 2nd November 2008 Connect to your server via ssh and then download the latest kernel version. Best practice is to look first via ftp for the correct file. Type within your terminal: ftp update.onlinehome-server.com User: anonymous Password: guest cd local-updates/kernel/deb/ ls exit The filename of the latest version......