EUREKA!!

11/05/2009 at 8:28 pm (Uncategorized)

After quite a struggle getting a handle on openCL, Dr. Khanna and myself finally have a working CPU and GPU version of the code! This is fantastic as it is literally one of the very first working openCL code pieces (of any use that is, since the others are merely adding, multiplication and “hello world” type programs) in the world!

We have however a strange problem. Since the parallelized portion of the code is launched and run in a kernel, programming get a bit tricky. When running the the kernel on the CPU, there are no worries since the kernel is in the same scope as the main code. When dealing with the GPU however, get ready to get your hands dirty. Sine the GPU is not in the same scope as the host-run code, no libraries can be appended to the kernel. This means difficult debugging, no printf statements to check your place and worst of all (at least in our case) no user defined data types. OpenCL has no predefined method of representing complex numbers (which are VERY important in calculating the source term of the Teukolsky equation). In C and C++ operator overloading is supported. The portion of code run on the host also supports user defined data types. But not the kernel! Nope. This left us high and dry for awhile. We then put maple to work in physically separating all of the real and imaginary components so that we can deal with them all separately. This took maple over two days to do (non stop) and left us with over 2 million terms (as opposed to roughly 4000)!!! To alleviate this, we had to set the spin of the black hole equal to zero to even get a reasonable amount (and it’s not very reasonable as it is). Setting the spin equal to zero changes the type of black hole we’re dealing with from  a rotating (Kerr) black hole to a stationary (Schwarzschild) black hole, which is not what we want. This predicament is ongoing but looks to be the only challenge left in this small portion of the big project!!

Advertisement

1 Comment

  1. jmckennon said,

    eh. I wouldn’t go that far. I had no idea I was presenting until about a half hour ago so it was pretty all over the place.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.