Archive for October, 2008

GPGPU journey 2: Feeling my way around

Friday, October 31st, 2008

Done

  1. Setup development environment in windows
  2. Figure out hardware requirements
  3. Do a first compile run
  4. Find out how to draw a 3d object

I read a lot and played around with several IDE. Sat down with someone who has a thesis on that and realized that the only way to draw/display is to use Open GL. I am having a hard time finding an example of a simple “Here, draw this value on to pixel (1,1) of your screen”. Pretty frustrating. Now that I have isolated a path, I should be able to get on with development.

To do

  1. Setup development environment in Linux
  2. GPGPU and GT
  3. Sigma Delta
  4. Find and install OpenGL IDE

Progress is slow. I have started the conversion of Verilog code into C on spare times. I was really shocked when I read the code from 5 years ago. I kept on thinking: “And I understood these? Wrote these?” There are around 1500 lines of code for the core logic and about the same amount of code for wiring and connections between components. It really brings back memories of back when I was designer. Multiple windows open for on the whim tracing of a wire through all the core logics. Like playing a game of connect the dot in the dark.

Setting up a development environment with Radeon HD2900 GT has failed miserably. Especially after installing ATI’s drivers. It looks like I will have to install a Linux partition at home to test it with the HD2400 to see if the same thing happens. I am guessing that this black screen problem is caused by using AMD’s Barcelona core with stepping #1. The graphic card basically fails completely if I try to bring up the X server. Switching back into terminal does not bring the display back. Fixing this will take too long, so I am just going to switch cards.

It looks like I will have to learn OpenGL. I have no experience what so ever in it. Can anybody suggest a placce to start?

Funny business 24: Conscientious shopper

Wednesday, October 29th, 2008

I would say that I am a conscientious shopper.  Someone who buys only after evaluating necessity, emotions, financial situation and the broader economy (currency, inflation etc.) in general. Buying electronics when the currency exchange rate are the most favorable, waiting till the car dealerships are crashing and burning to bring a cash upfront deal to get huge discounts and finally, optimizing only when the effort/cost justifies the savings.

I shop around, but I also understand that shopping around wastes time/money and is not worth it if you have to shop around a lot. Therefore, I am more likely to stick with a few trusted source to go to than buying the cheapest thing out there. I also like to make (annd see) everyone and everything I approve of, prosper.

So, I get to thinking during the finals days of bus/metro riding, what will make me stay with certain dealers? Sincerity of service. Yes, I am usually cheap on my first trip due to the great deal that’s announced somewhere, but if I like the service, I will usually stick with the same person most of the time. I say sincerity because I know about all the sales techniques people use from working closely with sales. It sets off an alarm inside that will usually make me bail out of a deal unless it’s a really good deal. I just don’t like the fact that people are applying techniques to me.

So in sum. Great deal to attract me to the store so that you can show me the sincere service you provide. Of course, the sales person will have to judge whether or not I am worth that kind of service. There are people who’s just out there to rip off businesses.

Invisible stress

Monday, October 27th, 2008

I have dedicated all my efforts to a project ever since I came back in May. Before that I have dedicated my life to the trip that I took in May. So I haven’t had any chance to take care of everything else in life as evidence by my surroundings slowly breaking down.

Little things here and little things there did register in my subconscious even though I try my best to ignore them. To leave it until the project is completed. Well they are done now and I kept wondering if things would’ve been more pleasant if I had spared some time to maintain other parts of my life. Would I have been able to concentrate more if everything is clean and orderly?

In any case, now that there are no grandios goal to reach, I seem to draw some sense of accomplishment out of slowly improving my quality of life little by little. Yet at the same time, I know that these won’t really contribute to the grand scheme of things.

What would accomplishing this bring? Just a sense of “I can do this”. Not something transferable or favorably looked up upon by anyone else. I sometimes question the logic behind my wanting to do certain tasks. In any case, I have dedicated my whole income to accomplishing these projects now so at least we will see some progress.

GPGPU journey 1: First run

Thursday, October 23rd, 2008

Done

  1. Setup development environment in windows
  2. Figure out hardware requirements
  3. Do a first compile run

Found out that ATI’s cores from R600 and up will be able to handle GPGPU programming. i.e X800 and up cards.  For Nvidia, they claim that it is geforce 6000 series but none of the CUDA examples will compile and run. Maybe I should try to run Brook+ examples.

After playing around with hardware and the development environment. I have settled on a cheap $16 Radeon HD2400 to develop at home and using my Radeon HD2900GT at work for more techniques exploration. I am going to stick with Brook+ for now on a windows XP 32 bit environment and slowly move on to RedHat 5.1 in parallel.

I did a first compile and had it working. Encountered some reduction kernel fragment error.  A quick search online shows that reduction can only be done on factorials of 2, 3, 5, 7 and 9.  For now I will just assume that a reduction is the process where 2 inputs nets 1 output. I will have to go into more details on this terminology later.

To do

  1. Setup development environment in Linux
  2. Find out how to draw a 3d object
  3. GPGPU and GT
  4. Sigma Delta

It looks like the example projects are setup with Makefiles and Linux in mind so it is only natural to do the same since developing with Visual studio probalby means tweaking all these settings that I have no idea about. But I wasn’t able to get the HD2900 GT to boot up properly under Red Hat Enterprise 5.1. Go figure. ATI has always been bad at supporting linux drivers. Once I get this done, I should be able to compile under linux without problems.

The next step is to find out how to draw a simple 3d object and display it so I can have direct feedback of my results instead of looking at the boring console data outputs. I will probably also need to find  out how to output through linu’x GT GUI.

The first project should be able to be developed in parallel with everything. I am going to port my verilog RTL code to C first and make a first run with one stream of data under a standard cpu. Once that’s done, I will port it to run on GPGPU for one pixel and later on to a full video stream. Need to find a RAW data source for video input.

State of the world economy

Wednesday, October 22nd, 2008

This is the type of time when it’s good to have contacts in different parts of the world and different industries. A few queries gave me a clear picture of what is going on. The economies related to housing and finance are going down hard while everything else in the world is still having record sales figure. Everything except the US and Europe that is. Some OEM unrelated to the two trouble industry but situated in these two geographic locations are panicking because of the freezing in bank lending. Most of them are companies that overly rely on credit to get through the month. Which brings me to the conclusion that a 35% drop in every sector is uncalled for.

To bring this into perspective, yes the economy is contracting by a few percentage, but you can’t just look at it in terms of percentage. Five percent from a historical high is still a great number. You have to understand that there are only so many people to consume products that a cap will be reached at one point or another.

The traditional industrial equipment saw a record bookings in the month of August which suggest that most of these industries are been overlooked. Let’s  take the tech sector for example, its record revenue this quarter are muted by the insane losses at the financial institutions. Wachovia lost 29billion today. Whereas before the fear settled in people’s heart, investor’s would just shift their money into sectors that are outperforming. In a fear driven environment any bad news will propagate through the whole economy. If this continues, you will have to look at the facts one day and realize that even if everything looks like shit. Apple is still selling 11 million ipods every 3 months.

Tech was poised for a big jump before this whole mess came in and I expect it to continue once we muddled through these uncertainties.

You are what you repeatedly do

Tuesday, October 21st, 2008

Here’s a new way to evaluate my life. A more objective flow of reasoning than the one that I use when talking to myself. The perception of self is different when looking at it based on facts. It tells me that I have a lot of changes to make. Here’s the break down based on the frequency (per month) at which I switch to a certain task (not based on time spent)

  1. Eat: 90
  2. Work on stocks: 90
  3. Read news online: 60
  4. Sleep: 30
  5. Work: 20
  6. Write blog: 4
  7. Clean: 4
  8. Photograph: 1
  9. Eat out: 1
  10. Play games: 1
  11. Photoshop:  1
  12. Cook:1
  13. Program: 0
  14. Play with computer: 0
  15. Dance: 0
  16. Workout: 0

From the evidence, I am stuck doing pointless things repeatedly. Waiting for the latest news and reading too much. I should switch those time to perform other tasks. Granted, the past few months are an exceptional time, but I should not be straying away from normal daily practices when focusing on a project.

This list also showed me that I have a distorted sense of expertise in both programming and dancing as I don’t practice them with enough frequency. The skills have “degraded” so to speak.

This I am familiar with

Monday, October 20th, 2008

Most of my colleagues at work are panicking. People are talking about the stock market in disbelief and all I can think about is: “Gee, you guys are slow.” I remember looking at the stock charts in horrow around Febuary, the feeling of being the only one depressed still fresh in my mind.

Probably not good form to be laughing right now, but I am not going to deny the fact that I am happy. Fact of the matter is, the world is now shifting into something that I am more familiar with than your average North American: “Poverty”.

This I understand. This, I have lived with for most of my life and this, is the lifestyle that I have adhered to even during good times. People with more savings have lost more than I did. My loss is peanuts compared to the rich millionaires. The crisis brought them down to my level and brought the world to a more conservative and down to earth mentality: “My territory”.

Add that to my own belief that I am most brilliant and aggressive during times of change. I have to say that things are aligned my way. Just to prove my point, I summoned 10k worth of cash into my bank account from various places to make sure that the transactions can still go through without a hitch and to estimate the time it needs for them to settle. These are my dry powders, my leverage for the way up.

What are the odds that you get hit by lighting twice on the exact same spot? I am betting on that odd. If I am wrong, call me lucky if you will to be the one in a few billion.

Gone loco

Monday, October 20th, 2008

I laughed all the way down with a manic saddistic tone, almost desperate but liberating. I’ve been doing that for the past two weeks whenever anyone asked me about the stock market. I told these people that I am laughing because these bankers and traders finally got a taste of what I had when I graduated into 2003. I also told them that through these loss, I have finally reached an emotional state that I have sought ever since I became independent at 18. Yes, it is true. I am no longer bound by losses.

Have I gone crazy? Maybe. Could this be a backlash of extreme sorrow? Maybe. Anything could cause it, but one thing is certain. My heart has never felt lighter, nor have I been so unrestrained at any other time in my life. It also seems to coincide with being healthy again. Today I drank some coffee and ate some frozen pasta. I tasted a few things that I wasn’t aware of before.

It feels as if some burden’s been lifted from my shoulders. The burden to succeed, to leave a legacy, to achieve a better life than others and to be rich. For now, there are no goals and I just do things as it comes to mind. I am going to live like that for a while. It is the opposite of what my life had been.

The financial advisor next door

Tuesday, October 14th, 2008

When people I know see their RRSP and mutual fund fall 20%, what do they do? They seek my advice. It has been a recurring theme at work and in the personal friendship I maintain to a point where I have to adit. I am better than the norm at managing both financial strategy and tactics.

Still, the first warning I gave most people is always this: “I’ve lost money in this market and I am doing things against my own advice because I want to try and beat the market. Trial by fire is the best way to learn.” This reputation didn’t build up overnight though. I think it started with my last year’s prediction of a company layoff, February’s worst case scenario coming true and more recently predicting bank failures a week before they happened. (Although the last two: National city and Citigroup did not fall and I don’t believe they will fall now that correct measures are in place).

Most of them just want to know how the interest rate will probably play out in the next few years while others seek understanding in all the fancy terms used by financial experts most just can’t trust their financial advisor who told them to hold their mutual fund.

For those lucky enough to seek my advice a month ago, I’ve already told them to sell everything. For those who asked me recently, I told them it’s too late to sell. Whether or not they did it or not does not concern me.My only concern is being able to provide the most accurate deduction based on psychology and technical analysis to anyone who asked without prejudice. These advices are accurate up to 50%. Because I am assuming that no new measures will be put into place. My predictions will only come true when the government do not intervene.

It really made me wonder who you can trust in this world. If I am actually doing better than some of the top investment bankers in wall street, what does that say about their judgement and high IQ? During these time, you cannot rely on anyone’s advice. The big question is: “Should I sell?”. Everyone you ask will want you to hold because they have their own stake in your money. These financial advisors need you to keep your money in their fund so they can keep their job.

I will ask you: “What’s your situation?”

Protected: Secret project’s failure

Tuesday, October 14th, 2008

This post is password protected. To view it please enter your password below:


Shattering of beliefs

Tuesday, October 7th, 2008

I felt it. Something snapped inside me. It happened as I was mentally preparing myself to face the worst of all possibilities in order to accept failure in everything. Part of me was still clinging on to the belief that this isn’t happening. OH but it is. Every indication points to the worst.

For a brief moment, I allowed myself to accept that fact in order to analyze the repercussions of such a reality. I didn’t know, that the brief moment was enough to break me.  It broke me because suddenly, everything became crystal clear. Today, I understand that for my particular life: effort = failure.

It might not be true for everyone. It defies logic yet the facts are overwhelmingly against me. For every great project that I set my mind to. Projects that requires long term planning, resources and research always fail. While, at the same time, the random undertakings usually succeed. I denied myself this conclusion because I’ve been brought up in a society where I was taught that effort = reward. Patience, stability and hard working means a pat on the back.

Life doesn’t work like that. At least, not in my life. It makes a perverse sense logic now that I looked back on my life. My exs leave me when I started getting serious about the relationship. Graduating into the high tech collapse with no job and recently, starting stock investing right before the mother of all bubbles.

So, once I accepted this as a fact and accept that effort is not equals to reward, I decided that since the current lifestyle doesn’t work, the opposite must be true. No plans. Just pure randomness from now on. My heart has never felt lighter.

Under duress

Monday, October 6th, 2008

I can’t wait till the day when I get out of this bad position I am in right now. All these uncertainties around my financial prediction in direct conflict with my instinct to run.  On the other hand, I am waiting for a sort of judgment from certain people. A yes or no that will either confirm or deny my belief up until this point in life. While, the two separate events might not destroy me by themselves, I am not sure if I can handle them at the same time.

Financially, I have already told all the people I know who invest to get out of the market and repeatedly hammer that into their brain until they unwillingly put that sell order. I suspect that my own unwillingness to get out of the market has something to do with it. However, I have since cleared it up with most of them by telling them that I am doing this as an academic research. I am, in fact, trying to see if I can beat the house during a depression.

Oh it worked well. I studied the great depression, the savings and loan crisis and I made my moves based on weekends after weekends of research. Long story short, they did jack to me and I am having a lot of regret at watching the strategy go up in smokes in the last 7 days. Yep, I managed to stay in the positive until 7 days ago.  Until the house representative first denied the bailout bill. Which led to a domino of US bank failure and European bank failure. Today, I heard that Iceland might even go bankrupt as a country.

On the other hand, I am waiting for the conclusion of my secret project. Which is a culmination of everything that I stood for. An acknowledgment of my achievements as a person who seeks out change and welcomes the unknonw. Someone who constantly seeks to improve oneself in every aspect of life.

You can see why I say that I am under duress now. My only solace lies with this French song that I put on a loop back. It is the sedative that prevents me from acting out the violence within. The one voice of hope that I am holding onto by a thin thread because I don’t know if I can handle what’s to come. I am in an unknown territory. A mental challenge that either confirms or denies what I have believed in.

What excites me most about this ordeal is how I will emerge out of the mess in a few years. How will I look back with a knowing smile? Will I laugh at my folly? Or will I be proud of my achievement under these serious conditions? Maybe I will brush them aside and laugh at myself for taking these small problems so seriously. The future is so exciting because I have placed my foot down and said: “Here is my belief and I put everything that I have on the line to reach for my belief.”