Monday, January 09, 2012

Baking Vegetables

I came home this evening and felt like making something with the vegetables in the freezer. I decided I would try to bake them. Not knowing anything about timing and temperature for baking vegetables, I gave my friend LadyParadox a call and asked for advice. Based on her advice, I made ...

"Baked Vegetables with Indian Spices"

Here's how to make it.

You will need:
  • A place to make it
  • The place (preferably a kitchen) should have an oven and you should have permission/rights to use the place for the next one or more hours. If you get kicked out of there in 30 minutes, you're going to find it difficult.
  • A refrigerator that you can put stuff into would be also nice to have access to.
  • A baking dish/pan/rack that can be used.
  • Non stick cooking spray + Aluminium foil OR non-stick aluminium foil. (That's the British spelling of the metal that has the symbol Al. Deal with it.)
  • Vegetables - whatever you feel like using (more importantly, these should be vegetables you want to eat). I used Cauliflower and Carrots. (bought frozen & cut from the local Walmart).
  • Spices: I used the following powders - coriander, turmeric, chilly, minced garlic, ginger, salt, a pinch of garam masala and a pinch of chicken curry masala. Use what you want, this is meant to be easy to make.
  • Yogurt
  • A timer/stopwatch
The How To Do It.
  • Step-0: Obtain the vegetables if you don't already have it.
  • Step-1: Cut/slice/dice as you desire. Defrost the vegetables if required. Do not defrost with heat since you don't want them to start cooking already.

  • Baked vegetables with indian spices

  • Step-2: Mix the vegetables with the Yogurt + Spices throughly.

  • Baked vegetables with indian spices

  • Step-3: Marinate by putting it in the refrigerator (if possible) for 30 minutes to an hour.

  • Baked vegetables with indian spices

  • Step-4a: Start heating up your oven to 350F.
  • Step-4b: Remove marinade from fridge and mix throughly.
  • Step-4c: If using baking pan + aluminum foil: Grease the foil with a light coating of non-stick cooking spray.
  • Step-4d: Spread the marinade onto the pan. Make sure its well spread out in a single layer.


  • Baked vegetables with indian spices

  • Step-5a: Place into oven and bake for 20 minutes. (Time this!)
  • Step-5b: After 20 minutes, check, and then place in broil mode for upto 10 minutes - check/mix/turn things around to ensure everything stays mixed and does not burn.



  • Step-6: Remove from oven and let cook to touch.

  • Baked vegetables with indian spices

  • Step-7: Once it has begun to cool, mix the spices and the vegetables again and let it sit.

  • Baked vegetables with indian spices

  • Step-8: Serve while still warm. I recommend serving with tortillas on the side.

  • Baked vegetables with indian spices

  • Step-9: There is no step-9. You're done!
Hat Tip to LadyParadox

Saturday, December 24, 2011

Wrapping up 2011

2011 comes to a close in 1 week. How has this year been? Hard to say. Its had its ups and downs. Overall better than 2010? Yes, I think so.

The good: I met some amazing people some of whom have become extremely good friends. They made me do some new stuff that I've never done before. Graduate school is going on, I learnt a bunch of new stuff (Across the spectrum ranging from arcane knowledge [1] to bleeding edge
research [2]). Being a teaching assistant has been a combination of being extremely frustrating and intensely rewarding.

The bad: I had my share of setbacks, failures, missed chances and lost friendships.

Did I learn stuff from this year? Yes. Experiences are good and as the saying goes, what doesn't kill you, only makes you stronger.

Also, note to future-self: Don't talk to people about an emotionally charged topic when you are hungry/angry/sleepy/tired or don't have enough caffeine in you. The conversation WILL go better when you've had a night's sleep and have some caffeine and some food in you. Trust the wisdom you gained in 2011 about this.

Resolutions? Sure! my standard resolution is to not make any resolutions. Actually, that's not completely true, I may make some resolutions internally but (a) they aren't tied to the date of January-1 with a 1-year validity period and/or (b) they are unlikely to be posted on a blog such as this.

To wrap up: Here's RFC 1882: the 12-days of technology before Christmas:
http://www.ietf.org/rfc/rfc1882.txt

[1] Van Halen's standard performance contract contained a provision calling for them to be provided with a bowl of M&Ms, but with all the brown candies removed. This was to check how carefully the crew went through the clauses to ensure that the setup was done to specifications.
http://www.snopes.com/music/artists/vanhalen.asp


[2]
http://www.anandtech.com/show/4313/intel-announces-first-22nm-3d-trigate-transistors-shipping-in-2h-2011

Wednesday, November 30, 2011

Cold Weather in India

"In India, 'cold weather' is merely a conventional phrase and has come
into use through the necessity of having some way to distinguish between
weather which will melt a brass door-knob and weather which will only
make it mushy."

- Mark Twain (attributed to)

Saturday, October 22, 2011

Remove turmeric stain

To remove the stain of Turmeric from a vessel, soak for a few minutes in
a mixture of Coke and Baking Soda. (alternatively (dilute) Vinegar and
Baking Soda)

Friday, October 07, 2011

Temperature Plot: Living Room

This is the plot of temperature in my living room. Recorded between 11pm
(10/6) and 10pm (10/7).

Plotted using a iButton from Maxim. 5 minute intervals.

Thursday, September 22, 2011

The Open letter collection

It seems to be all the rage to be writing "Open Letters" these days in India. Social networks (and email systems) across the planet seem to be buzzing with all the letters flying left and right. (or is it North-South/East-West ?)

I got to hear about so many of these that I initially pondered writing one of my own. Alas, I cannot write as eloquently as some of the writers, so I decided against it. Here instead, is a collection of the various open letters that are (to my knowledge) buzzing around everywhere.

The oldest and perhaps the most well read until  recently was the 2004 open letter quoted below

"The Travails of Single South Indian men of conservative upbringing" or "Why we don't get any..."
http://www.whatay.com/2004/05/17/the-travails-of-single-south-indian-men-of-conser/(Edit: Updated April 2012 for new URL)

More recently, we got the rant against men from the city of Delhi:

OPEN LETTER TO A DELHI BOY
http://raagshahana.blogspot.com/2011/09/open-letter-to-delhi-boy.html

This one set of a firestorm! Twitter, Facebook, Google+ ... take the pick of your favorite social network and I'm pretty sure you've seen it being quoted and forwarded and posted and #hastagged all over the place.

A Delhi boy wrote back in protest

Bhaiyya... Palika Bazaar ka kitna? 
(translates to "How much (does it cost) to get to Palika Bazaar" - a shopping center in Delhi)
http://disgruntledmob.blogspot.com/2011/09/bhaiyya-palika-bazaar-ka-kitna.html

There was another lady who didn't particulary care for the "Open letter to a Delhi boy" either.

'Tis the season for open letters

http://www.lavanyad.com/madmomma/?p=6298


Somewhere along the line, another open letter came up, this one ranting against the language skills of people from the Indian state of West Bengal.

Dear Bengali boy, what's with the accent?
http://theblackrosegal.blogspot.com/2011/09/dear-bengali-boy-whats-with-accent.html


(I haven't seen a response to this one yet, if you do, please let me know in the comments and I'll link it up)

The latest one I've seen is the one below, where she tries to analyze this North-South divide.

THE NAARTH-SAUTH WAR - a Madrasi take
http://www.sify.com/news/the-naarth-sauth-war-a-madrasi-s-take-news-columns-ljwkWphgcfd.html

There are so many open letters flying around, that it prompted one person to write an "Open Rant"

An Open Rant
http://unpredictableblog.wordpress.com/2011/09/15/an-open-rant/

Have I missed some? please let me know!

Sunday, September 04, 2011

Cherry cobbler

How to make Cherry Cobbler:

This is amongst the fastest desserts I've ever seen made. Recipe by the Awesome Kym.

You will need:

a) A can of cherries (the type you use for making pie filling, NOT maraschino cherries) (ask me how I know)
b) A box of Yellow cake mix.
d) A stick of butter.
c) A baking pan/dish - (9x11 or 8x8 are the ideal sizes, but for this dish, size of the dish doesn't matter. It all depends on how much of the dish you want and how thick you want it).

Make it:
a.1) Wash the pan/dish. (duh!)
a.2) Start preheating the oven to 375F 350F. (Updated based on feedback from the Awesome Kym)

b) Dump in the entire can of cherries.
c) Cover the cherries with the cake mix - (we made it about an inch thick)
d) Now cut up the butter into small strips (about an inch long by 1/8th of an inch wide) and place it all over the cake mix - Basically cover the cake mix with strips of butter.

e.1) Place this into the oven and let it sit for 30 minutes.
e.2) " the cherries are precooked, so you just want it hot and the butter to melt nicely into the powder"[1]

f) When done, take it out, let it cool, then eat!

g) There is no step (g).

Thursday, August 25, 2011

Ninite: For automatic multiple program installation

I had to re-install the operating system on my laptop recently. Leading to me wanting my entire list of frequently used programs reinstalled. This was going to be a pain. Amongst other things, I knew I needed the following programs.

Firefox
Thunderbird (Mozilla email client)
Keepass
Pidgin (Multi-protocol IM client)
Notepad++
WinSCP
PuTTy
Paint.Net
Inkscape
VLC
TrueCrypt
CutePDF (Standalone PDF printer)
Foxit PDF Reader

and more...
Installing each separately is a pain. (I've done it in the past) I remembered this post [1] on Lifehacker. Hence, I decided to give Ninite a chance.

Ninite is a bulk-installer. It automates the chore of downloading programs from their websites and then installing them. So, I went to their website and downloaded a custom installer for me. (The site gives you a list of programs available, you choose the programs you want, then the site gives you a smaller installer utility that downloads and installs the programs for you.)

Here's what I saw as it was installing:


Security paranoid folks might wonder what the implications are. There are risks - since you don't know what else this tool is installing for you. I had my anti-virus and firewall watch the application carefully and I didn't see it complain, so I guess I am good.

I will be suggesting this to people who want to make the re-install of applications painless on Windows machines. Ubuntu and other Linux distributions already do this with their package mangers and "software centers". Until this tool came along, either rolling your own OS installation disc with the other software slipstreamed into the disc or having a cloned image of a drive was the only way to have this sort of automated installation on a home machine. (Windows machines on a domain with a domain controller can have all sort of fancy features including a start up script that installs stuff from the server.)

[1] http://lifehacker.com/5388408/ninite-bulk+installs-great-free-windows-apps


Adding time servers to Windows XP

Windows XP by default allows you to configure it to automatically keep your system clock synchronized to two servers (time.windows.com and time.nist.gov). How about if you want to add another server to the list?

There are two ways to do this.

a) If you are logged in as an Administrator, you can directly type in the name of the server into the Internet Time tab (see image below, just type in the name of the server into the Server: box.) (ntppub.tamu.edu is the public facing NTP server from Texas A&M University)


b) Alternatively, you can add a couple of registry entries. [BEWARE! MODIFYING THE REGISTRY IS A RISKY BUSINESS, DO IT AT YOUR OWN RISK]

To make this happen: [1]
  • Open the Registry Editor (Start > Run> regedit.exe)
  • Navigate to to the following entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current
    Version\DateTime\Servers. Click on the "Servers" entry to activate it on the right side.
  • You should see a list of servers (time.windows.com and time.nist.gov) listed in the window to the right.
  • Right-click in the window the right and select New > String value.
  • Name the value 3 (one more than the last # present) , and press [Enter] twice to open the "Edit StringValue" dialog.
  • Type the address of the NTP server into the textbox named Value Data, and click OK.
  • Close the Registry editor.
  • Now if you look at the Internet Time Tab, you should see your new time servers listed there.

    [1] http://www.techrepublic.com/article/tech-tip-add-internet-time-servers/5109818

    Monday, June 06, 2011

    MikTex and TeXniC center

    When using TeXniC center 1.0 on Windows-7 with MikTeX, look for the do
    the following to solve most issues especially related to BibTex acting
    up or PDF LateX complaining about GUI framework.

    a) Set packages to be updated automatically (Miktex>Settings)
    b) Install package 'translator' if you graphics in your PDF.
    c) Remove all languages you don't use Miktex>Settings>Languages.
    d) Leave MikTex to be in A4 size and use the Ghostscript/dvips settings
    to scale to Letter sized paper.
    e) Update MikTeX as soon as you install it.

    Tuesday, March 29, 2011

    Firefox-4: Prevent Tab scrolling / tabMinWidth not working / Tab width setting

    Firefox-4 does not support the configuration option >> browser.tabs.tabMinWidth [1]

    In Firefox 3.6 and older, you could set this value to 0 in about:config to prevent the scrolling of tabs if you opened up a large number of tabs.

    To get this to work in Firefox-4, you need to make some changes to your userChrome.css file [2]. Or you can install the Custom Tab Width Extension [3]

    In my XP installation the userChrome.css file was in
    C:\Documents and Settings\<userName>\Application Data\Mozilla\Firefox\Profiles\<randomString>.default\chrome\userChrome.css

    Open this file, add the below lines

    /*--start below this line--*/
    /*Added to re-enable min tab width=0 in Firefox-4 */
    .tabbrowser-tab:not([pinned]) {
        min-width: 1px !important;
    }
    /*--stop above this line--*/

    Restart Firefox and your tab behaviour should be back to the way it was.

    [1] https://bugzilla.mozilla.org/show_bug.cgi?id=574654
    [2] http://blog.miranda.or.at/mozilla/firefox-4-and-minimum-maximum-tab-width
    [3] https://addons.mozilla.org/en-us/firefox/addon/custom-tab-width/

    Saturday, February 19, 2011

    Embed all fonts in PDF

    The command line arguments to embed ALL fonts in a PDF document.
    (Especially required to pass IEEE Explore PDF Check)

    Place the following in the arguments to ps2pdf:

    -sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite
    -dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true
    -dEmbedAllFonts=true -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps"


    where "-dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true
    -dEmbedAllFonts=true" is the specification to tell ps2pdf to embed
    everything.


    See: http://people.engr.ncsu.edu/txie/publications/writingtools.html for
    more information

    Also, see my previous post here :
    http://suneilmohan.blogspot.com/2010/01/miktex-texniccenter-us-letter-sized.html

    Saturday, January 22, 2011

    CM19a X10 Transceiver on Ubuntu 10.04

    The CM19a is a USB based X10 Transceiver. This is a modified version of
    the more popular CM11/CM11A/CM15/CM17 versions all of which have serial
    interfaces

    ** All of this information is from :
    http://www.cuddon.net/search/label/CM19a ** I'm only posting it here so
    that I can find it again easily

    1. The Python driver written by Andrew (www.cuddon.net), requires
    sudo/root permissions. To make the USB driver work for any user, do the
    below:

    Add this to /etcudev/rules.d/cm19a.rules
    #Allow all users to read and write to the CM19a X10 Transceiver (USB)
    SYSFS{idVendor}=="0bc7", SYSFS{idProduct}=="0002", MODE="666"

    2. Blacklist two modules (in 10.04) so that the CM19a is seen by the system:

    Edit using vim or nano /etc/modprobe.d/blacklist.conf

    Add the following two lines at the bottom of the file:

    blacklist lirc_atiusb
    blacklist ati_remote

    Reboot the machine so that the modules are unloaded and the udev rules
    are updated at the same time.

    Visit Andrew's site for Python drivers for the CM19a
    http://www.cuddon.net/search/label/CM19a

    Monday, November 08, 2010

    Test Post?

    This is a test post to see if I can selectively lock down a post on this blog.

    Tuesday, October 26, 2010

    Random musing

    I think its high time I embraced the enterprise e-markets in order to
    monetize out-of-the-box mindshare that can enable the transition to
    efficient interfaces that empower the best-of-breed supply-chains.

    Friday, September 17, 2010

    Tuesday, August 17, 2010

    CUDA 3.1 on Ubuntu 9.10 for Tesla c870

    CUDA toolkit version 3.1 on Ubuntu 9.10 : [32 bit]
    For Tesla c870 with Intel Onboard video (Integrated Graphics)

    This is based heavily on the information from here:
    http://forums.nvidia.com/index.php?showtopic=171590

    [If you want CUDA 3.1 to run on Ubuntu 10.04, follow the above link to the Nvidia forums]

    Note : Windows XP does not like dual video cards from different manufacturers, I believe Vista and later do support it - hence I had to goto Ubuntu.

    You will need:
    a) Ubuntu 9.10 (This is the latest supported Ubuntu package from NVIDIA
    for CUDA 3.1)
    b) A compatible card that supports CUDA. I'm using the Tesla c870 in this case.

    My requirements:
    1. The Tesla cards do not provide Video Out - hence the card needed to work in conjunction with the onboard Intel video card.
    3. Multiple users need to be able to compile and run the code, so it needs to get installed to a commonly accessible folder

    **Installation and Configuration**

    ==Part A==Getting Started==

    1. Install Ubuntu.
    2. Run the Update Manager and get all the updates to date.
    3. Get g++ installed using "sudo apt-get install g++" (w/o quotes)

    This will install g++ compiler for gcc-4.4.1 (which is the default for Ubuntu 9.10)

    ==Part B == Installing the driver==

    Get the latest NVIDIA Developer driver from
    http://developer.nvidia.com/object/cuda_3_1_downloads.html

    Version 256.40 or later. Earlier versions will not work. (Ubuntu 9.10 comes with 175 and 195 in the restricted driver set, these did not work for me)

    When I wrote this, the driver was packaged in a file called
    devdriver_3.1_linux_32_256.40.run

    You will need to install this after stopping the gdm (Gnome Desktop
    Manager). To do this:

    a) From the desktop, press CTRL+Alt+F1 - this should take you to a tty prompt.
    b) Login with your username.
    c) Type in "sudo /etc/init.d/gdm stop" (w/o quotes) to stop the gdm.
    d) Wait 1 minute while the X server unloads from memory.
    e) To launch the installation type "sudo ./devdriver_3.1_linux_32_256.40.run" (w/o quotes).
    f) The installation should start - accept all the default options and you should be good to go.

    If step (f) does not start, make sure the file is executable (Type "chmod +x devdriver_3.1_linux_32_256.40.run" (no quotes) at the command prompt to make it executable)

    g) Once the driver has finished installation, reboot the system. This can be done easily from the command line - use the command - "sudo reboot"

    h) Ubuntu should reboot and bring you back to the Gnome Desktop at this point. Login normally.

    ==Part C==Installing the Toolkit==

    1. Now get the Toolkit from the CUDA site. When I wrote this, the toolkit was in a package called cudatoolkit_3.1_linux_32_ubuntu9.10.run

    2. Before running this, there are a couple of packages you need to get. Otherwise during the make process, you will hit errors.

    3. Open Terminal, and get the following packages
    #(Fixes "cannot find -lXi" error)
    * libxext-dev
    * libxi-dev
    * x11proto-xext-dev

    #(Fixes "cannot find -lXmu" error)
    * libice-dev
    * libsm-dev
    * libxt-dev
    * libxmu-headers
    * libxmu-dev

    #(Fixes "cannot find -lglut" error)
    * freeglut3-dev
    * libglut3-dev

    You can get all of these using "sudo apt-get [package-name]" (w/o quotes) where package-name is one of the above. Or you can use one large apt-get statement and get all of them in a single command like below.

    "sudo apt-get install libxext-dev libxi-dev x11proto-xext-dev libice-dev
    libsm-dev libxt-dev libxmu-headers libxmu-dev freeglut3-dev libglut3-dev"

    (no quotes, remove any linebreaks that the HTML inserts)

    You may not need all of them and some of them may already be installed on your machine depending on what you other software you have installed.

    4. Once you have the above, install the CUDA toolkit.
    4.a. Command = "sudo ./cudatoolkit_3.1_linux_32_ubuntu9.10.run" (w/o quotes)
    4.b If it doesn't execute make sure it is executable, using the command "chmod +x cudatoolkit_3.1_linux_32_ubuntu9.10.run"

    5. Accept the default installation path /usr/local/cuda, or change it as you wish, but keep track of it

    6. Let it run to completion. It will exit with a message saying that the installation was successful as well as messages to add certain PATHS to your profile

    **7. Open the GLOBAL .bashrc file (located as /etc/bash.bashrc) and add the two path statements listed below to the end of the file. You will have to be root to edit /etc/*, so open the file using the sudo command with your favorite text editor such as "sudo vi /etc/bash.bashrc"

    export LD_LIBRARY_PATH=/usr/local/cuda/lib;
    export PATH=$PATH:/usr/local/cuda/bin/;

    (Single lines, terminate with a semicolon, no space on either side of the = signs, no line breaks.)

    This is important for global use. If you don't want it globally, set these two statements inside your .bashrc (~/.bashrc).

    8. Back at the command line, type in "sudo source /etc/bash.bashrc" to read in the updated paths. Test it to make sure using "echo $LD_LIBRARY_PATH" it should return the above path.

    == Part D == Installing the SDK code samples ==

    1. Get the SDK code samples from NVIDIA's site. When I wrote this, the SDK was inside a file called gpucomputingsdk_3.1_linux.run
    2. Run it "sudo ./gpucomputingsdk_3.1_linux.run". Again do the chmod +x thing if it is not executable.

    3. DO NOT ACCEPT the default install path. The default install path is something like "~/NVIDIA_COMPUTING_SDK" which will put it in your home-directory. This is a bad idea if you want global access. Make it something accessible to all, I used "/opt/cudasdk".

    4. It will ask you for path to CUDA, if you installed cuda above in Part C step-5 to the default part, it will be in /usr/local/cuda

    5. Let it run till it completes.

    6. Once it completes, you need to compile the code samples for your machine. To do this navigate to the SDK path (path you specified in Step-3 of Part D). Then navigate to the subfolder "C". You should see a Makefile. To make the examples, run "sudo make"

    7. The make process may throw up a bunch of warnings, but all files should make without errors. If there were errors, see if all the packages you should have installed in Part-C, Step-3 are present.

    8. If you have to run make again, always do a "make clean" before running make.

    9. At this point, you have almost got everything to work. If you have a CUDA enabled graphics card, you should be ready to go. If you are using a Tesla card like I am, you need a few more steps.

    == Part E == Getting the Tesla card available on boot ==

    1. Because the Tesla card is another video card, you need to make it get created as a node in /dev/ on each boot. (If you are using a graphics card, you don't need this, since it will be present since it is being used).

    2. Make a file scriptname.sh (I call it cuda_start.sh) with the following (remove any line breaks that the HTML inserts) __Update the entry Provides: to match the name of the file__

    ===begin copy below this====

    ### BEGIN INIT INFO
    # Provides: cuda_start
    # Required-Start: $syslog
    # Required-Stop: $syslog
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Mounts CUDA device as a node in /dev
    # Description: CUDA card requires entry in /dev, force create since NVIDIA is not video card
    ### END INIT INFO

    modprobe nvidia
    N3D=`/usr/bin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l`
    NVGA=`/usr/bin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l`

    N=`expr $N3D + $NVGA - 1`
    for i in `seq 0 $N`; do
    mknod -m 666 /dev/nvidia$i c 195 $i
    RETVAL=$?
    [ "$RETVAL" = 0 ] || exit $RETVAL
    done

    mknod -m 666 /dev/nvidiactl c 195 255

    ===end copy above this====

    3. What the script does is to make a node in /dev. This is based off the code sample I found from user (mfatica) here : http://forums.nvidia.com/index.php?showtopic=49769&st=0&p=272085&#entry272085

    4. Place this inside /etc/init.d/ so that it can be called by init when starting up. If you don't want to do this, you'll have to call the script everytime you reboot the machine.

    5. If you are placing it in /etc/init.d, then
    5.a Make it executable (chmod +x scriptname.sh)
    5.b Run update-rc so that it calls the script as
    "sudo update-rc scriptname.sh defaults"

    Method from here
    http://embraceubuntu.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/

    ==Part F== Global access and making it all work

    We are almost there, a few final touches:
    Remember I wanted it to be global access. I have a group on my machine called 'examplegroup' - all the members of whom I want to give access to the CUDA sdk, so I need to set appropriate permissions.

    1. Navigate to /usr/local.
    2. Set group to examplegroup using the chgrp command
    "sudo chgrp -R examplegroup CUDA" (w/o quotes)

    Sets the group name of the folder CUDA (and recursively everything inside it because of the -R) to examplegroup/

    3. Give the group full read-write permissions to the group
    "sudo chmod -R g=rwx CUDA"
    (w/o quotes, the g=rwx means to assign permission r(read), w(write), x(execute) to the group, -R flag for recursive )

    4. Navigate to where you installed the SDK (Part-D, Step-3, for me it is /opt/cudasdk)

    cd /opt/cudasdk

    5. Set group to examplegroup
    "sudo chgrp -R examplegroup *"

    (w/o quotes, the * means everything in the folder, the -R makes it recursive)

    6. Give the group read/write/execute permissions
    "sudo chmod -R g=rwx *" (w/o quotes, again * = everything, -R = recursive)

    7. You are done!

    8. Logout and reboot the machine. This is so that your init script gets called and your device comes up. (You don't need to do it, you can source the script without rebooting but I'm not going into that)

    == Part F == Test installation ==

    1. When you reboot and come back, navigate to the SDK folder and then to C/bin/linux/release [For me that was cd /opt/cudasdk/C/bin/linux/release]

    2. Run the deviceQuery script (./deviceQuery) You should get some glorious output

    ==snippet of my deviceQuery output==
    ./deviceQuery Starting...

    CUDA Device Query (Runtime API) version (CUDART static linking)

    There is 1 device supporting CUDA

    Device 0: "Tesla C870"
    CUDA Driver Version: 3.10
    CUDA Runtime Version: 3.10
    CUDA Capability Major revision number: 1
    CUDA Capability Minor revision number: 0
    Total amount of global memory: 1610416128 bytes
    Number of multiprocessors: 16
    Number of cores: 128
    Total amount of constant memory: 65536 bytes
    Total amount of shared memory per block: 16384 bytes
    Total number of registers available per block: 8192
    Warp size: 32
    == end snippet of deviceQuery

    3. Run a benchmark test ("./nbody -benchmark -n=100")
    ==nbody output==

    Run "nbody -benchmark [-n=]" to measure perfomance.
    -fullscreen (run n-body simulation in fullscreen mode)
    -fp64 (use double precision floating point values for simulation)

    > Windowed mode
    > Simulation data stored in video memory
    > Single precision floating point simulation
    > Compute 1.0 CUDA device: [Tesla C870]
    100 bodies, total time for 10 iterations: 0.326 ms
    = 0.307 billion interactions per second
    = 6.133 single-precision GFLOP/s at 20 flops per interaction
    ==end nbody output==

    4. There is no step.4.

    At this point your installation is ready to go.

    Good luck!

    === Update : Apr 21, 2011 ===
    An unexpected power outage caused the card to stop working. On rebooting, the card refused to run deviceQuery and complained of a potential mismatch between the API and the Runtime library.

    After lots of debugging with the help of my colleagues and the department IT folks, we traced it to a corrupted driver package. The solution was to re-install the driver such that it overwrites the existing installation. To do this, follow Part-B "Driver Installation" again step-by-step and it will reinstall the driver for you.
    You must do this step from a local console. Part-B driver installation cannot be reliably done from a remote SSH login.

    Thursday, June 10, 2010

    Viewing an exception backtrace using gdb/dbx

    GDB is the GNU Project Debugger.
    You can use it to find out why/where a program caused an exception that
    caused the OS to perform a core-dump.

    GDB requires that you compile with the gcc -g flag (include symbols) to
    get useful information. If you complied without the -g flag, the core
    dump will not be very useful to you.

    (If you have the source file, you can recompile once more with the -g
    flag, then run gdb against the new executable and the old core dump file.)

    Presuming you have complied file.c into myfile with the -g flag and
    running it created a core dump named 'core'

    Do:
    $> gdb myfile core

    This will start GDB and read in 'myfile' and 'core' and process it

    At the gdb prompt, type bt (for backtrace)
    (gdb)$ bt

    This will walk you backward through the stack trace showing you where
    the exception that caused the OS to abort and cause the core-dump. You
    should see a line at the end of the output identifying which line of
    source code caused the abort.

    *******

    On solaris, you can also use dbx. Run it as:

    $> dbx myfile core

    The opening screen will contain the backtrace by default.

    Tuesday, May 04, 2010

    Nullsoft Beep

    Nullsoft Beep is an application that makes your computer sound like
    computers sound in the movies. It requires Windows 95 or later with
    DirectX 3 or later.
    features

    * Excitement-Generation Technology[tm].
    * Hyper-Auto-Blips[tm] on screen updates and keyboard input.
    * Variable low hum dependent on system CPU load.
    * System tray icon.
    * Install and uninstall support.
    * Source code included!

    http://www.nullsoft.com/free/nbeep/