Tuesday, February 28, 2006

Off on a vacation

Off on a short vacation ! Leaving today evening and will be back on sunday :-)

In other news , cct8 was lousy tourny for my program due to 2 losses 'cos of some severe bugs ,one more loss since I missed a round due to sleeping :-P and one loss 'cos of ... awesome play by opponent !
So all in all :
4 losses, 4 wins , 1 draw ... kind of symmetrical :-P


Blogger V said...

Have fun!

2/28/2006 02:17:00 PM  
Blogger Pallavi said...

have a nice time

3/09/2006 10:14:00 AM  
Blogger  said...

I see you kept your promise to be back on Sunday with your 'to post or not to post' but I don't see it in your blog yet ...

Seems that bloglines work in, as they call in IM world, psyche mode ...

3/12/2006 11:46:00 PM  
Blogger Mridul said...

Actually I posted that ... and removed it :-)
It was my ramble on what/how I post - and I was on two minds whether to post it in the first place.
That post was describing the typical 'code-path' involved in me posting something here :-D ... and I fell for two of the points described there and removed the post ;-)

3/13/2006 03:27:00 AM  
Blogger Moonjungle said...

Thats My Boy!

3/13/2006 09:26:00 AM  
Blogger Mridul said...

What are you refering to vipin ?
I thought I told you that before leaving ...

3/14/2006 03:42:00 AM  

Post a Comment

Links to this post:

Create a Link

<< Home

Wednesday, February 22, 2006

Tussle with Intel compiler

So I got the eval version of icl to try what kind of optimisation speedup it gives to my chess program.
It seemed pretty fancy , with lot of 'extra' options to tweak the compilation , profile guided optimisation ,etc.
But the 'feature' which caught my fancy was code generation for a platform which might actually work : so essentially I wanted to see what sort of speedup I will get if I target for P4 ...
Note , chess programs have branches - lots and lots of them , and are essentially integer math : so cmov and family would give nice speedup. Also , vectorization of loops should be nice too.

I run for the P4 target (I ran for SSE2 actually) and voila - refused to execute on my comp !

"Fatal Error : This program was not built to run on the processor in your system."

Hmm , this is interesting - athlon 4200 supports SSE2 ... google'd and voila , I learn about the law suit between amd and intel , etc , etc. (Yep , old news - but then I never bothered with it until now :-D )
Now , how to make this work ?
I found this , give it a shot - no luck.
So , rolled up my sleeves , tried fixing that program - gave up : it is essentially brute force search for a pattern which has been changed in icc8.0 I guess.

Since I am not used to the PE format , wrote something which interprets the exe and was proceeding to find ways of 'nop'ing all those references to the intel 'checker routine' (__intel_new_proc_init_P btw).
Since I have lost touch with assembly for a while , googled to find out opcode forms for a proc call.
That is when I came across this.
He already has perl scripts to patch the exe !

Got them , tried them - and voila ! It works !!

Moral of the story - search for reuse before reinventing :-)
This is one lesson I keep relearning ;-)

* Update * The perl script breaks executable if I use PGO .... not sure why since the difference are the same. Mailed author and looking at the objdump myself too (I am way too rusty :-( )


Blogger  said...

"Good programmers know what to write. Great ones know what to rewrite" --ESR.

Always seek to reuse.

On an unrelated note, today's fortune was a long one:

The Fastest Defeat In Chess
The big name for us in the world of chess is Gibaud, a French chess
master. In Paris during 1924 he was beaten after only four moves by a Monsieur Lazard. Happily for posterity, the moves are recorded and so chess enthusiasts may reconstruct this magnificent collapse in the comfort of their own homes.
Lazard was black and Gibaud white:
1: P-Q4, Kt-KB3
2: Kt-Q2, P-K4
3: PxP, Kt-Kt5
4: P-K6, Kt-K6
White then resigns on realizing that a fifth move would involve
either a Q-KR5 check or the loss of his queen.
-- Stephen Pile, "The Book of Heroic Failures"

2/22/2006 11:01:00 AM  

Post a Comment

Links to this post:

Create a Link

<< Home

Tuesday, February 14, 2006

In general

In the current release of our IM server (should be GA'ed soon) , I was mainly working on a HTTP-XMPP gateway. JEP 124 defines this binding.
So , when I saw that gtalk was available through gmail - I was excited : another client (also corresponding server) implementation of this protocol !
But alas , this is not to be : the google folks have a POST based custom protocol for handling this (part of the syntax is pretty weird if you observe the over the wire data !) .
Considering their normal policy of adhering to standard protocol , I was not expecting this from them I guess ...

Moving on ... most people would Kerala would know about the infamous 'Rajan case' - about how a REC Calicut (my college) student was arrested , tortured and allegedly killed by the cops during the emergency.
From Vinod's blog , I came across this link (not sure when this came out though ...) which points to the account of Rajan's father : would be going through it later ... should be a good read.

Check out this for a new definition of 'asshat' , ROFL.


Post a Comment

Links to this post:

Create a Link

<< Home