Home
Razz's entries Razz's friends My profile! Back to Back to
Just a journal
Add to Memories
Tell a Friend
the pain, it hurts!!
so like I thought I was getting better so much that yesterday I cut my fiorinal dosage from 3 pills to 2 pills. I was fine yesterday but this morning when I woke up I was in some pain. "No big deal. I can handle this", I said to myself. Now it looks like my body built up a decent amount of whatever it is (opium or something) and that is why I was feeling ok but even after taking 2 pills today it seems like I'm in more pain then I was this morning. It looks like I'm going to take 3 pills again today and hopefully tomorrow I will feel better. To think, the chemicals are built up in my system, and the lack of pain isn't cuz I'm getting better but because of the build up.

How long must I be bed ridden!?!?! *frustration*
The whole day has been fucking frustrating. I feel like I'm not being productive in life. I missed out on different performing jobs because of this. I could have used that money! I enjoy performing too so I'm missing it. That and all of this programming I was originally doing to take my mind off the pain that turned into a sense of self worth -"at least I'm doing something productive"- is loosing its value. What have I done in the last 3 days? 2 days of writing pseudocode and asm instructions in a crazy rsa problem and 1 day (today) of me sitting around on my ass complaining to myself about the nvcc compiler and watching anime because I'm in to bad of a mood from the pain to actually put my seudo code to use. Not like I'll get anything out of this work, anyways...

But, even if I'm in a bad mood I gotta think positive! Maybe if I learn how to use the gpu really well I can write a bunch of random programs for a portfolio. That would give me a good edge when it comes to getting a programming job right? I'm scared when it comes to the future; my future.
Add to Memories
Tell a Friend
gaw my gfx card is insane
So I was playing around a bit and unless I made some weird mistake my gfx card supports 2,048 threads!! And this isn't software I'm talking about. This is full blown hardware. Core 2 Duo my ass with your 2 cores. My gfx card has you beat to a pulp! Also, it is one of the lower end gfx cards that support CUDA. The average gfx card's hardware (8600) supports usually 4,096 threads total. geez...

There are complications along the way unfortunately. My 8600 supports up to 512 threads for each core or 'block' and there are 4 blocks on my gpu. Each block has shared memory which sounds wonderful when it comes to threading tasks but ends up being painful when one gets down into the nitty gritty. Let me explain:
There is 16kB of shared memory for all 512 threads. This means that if you're doing any heavy data crunching you're pulling from the global memory which is the vram and is almost exactly 100 times slower. So what can go in the shared memory? i, or a counter can. A var is needed to tell which thread were in the number array it needs to do its math like num3[i]=num1[i]+num2[i]. Without this all threads would do the exact same work and overlap. Ok, so 1 var is needed. No big deal right? 1 32 bit int is 4KB and 16/4 is 4 so you can have 4 different loops going in the 512 threads. This is a hassle because that means each array of numbers is over 100 threads in size. that means numbers over the size unsigned long num[100]. Each num in the array out of 100 can give almost 10 digits so 10*100=1,000 digit numbers. Hopefully, no one in their right mind is adding numbers that size.

There are a couple of different tricks that I can think of in my drugged up half awake state right now: 1) do unsigned short i. i think that is 0 to 255 right? ... 65k I mean. that is 2kB ... 16/2 = 8 which is still a lot. char is 1 so 0 to 255 and umm ... i'm falling asleep as I type this lol... so up to 16 vars for 512 threads. 512/16=32 and num[32] is like almost 300 digit long number which is still pretty damn big.

Another trick I will probably have to do is have an i and a pointer and then put everything into 1 array (like I had already planned on my code that uses the cpu) and do some more math to find out were in the stack such en such is. This is annoying but allows for basically up to 512 individual numbers instead of up to 16 numbers. the problem is i will have mutex problems so lets say i have 100 numbers and 16 i's for loops. how do I go about that? ... gaw annoying.

you'd think they would at least give 1k per thread.

another solution which is tempting but probably a big no no is 8192 registers or 16 registers per thread. Unfortunately, I can't find out the register listing to see what does what but I could possibly dictate one register per num[array] ... gaw but the registers are not shared... fsck.



*goes to sleep* nighty night all ^_^


edit: so like is a normal 32bit int 4kB or 4B? *feels stupid* i guess this is what happens when you write a post at 3am in the morning with only 6 hours of sleep from the night before and tons of pills that make me drowsy.
Add to Memories
Tell a Friend
C is weird as **** sometimes
I learned C++ in college a couple of years ago and I was never taught c but since most of the stuff I do is C based with C++ wrappers I figured I'd learn C. So here I am programming in C and I hit one of the weirdest errors I think I've ever seen. It took me a while to figure out wtf was up.


I have:
#define NUM_THREAD_TASKS ARRAY_SIZE/NUM_THREADS
and in the situation with the error NUM_THREAD_TASKS=10;
I also have int thread which is the number of the thread. In my current test I have 3 threads and the problem happens with the last thread so thread=2; because numbering 0-2 instead of 1-3.

so:
NUM_THREAD_TASKS=10;
thread=2;


if I do:

i=thread*NUM_THREAD_TASKS;
printf("%d\n",i);

the output is 21. 10*2 is 21 !?!?


but get this. If I do:


i=NUM_THREAD_TASKS*thread;
printf("%d\n",i);

the output is 20. 10*2 is 20 !?!?


This is quite the error. It is simple to figure out. Since NUM_THREAD_TASKS is a float and everything else is an int it was bound to get funky eventually. I'll settle for:

i=thread*(int)NUM_THREAD_TASKS;



gaw some problems with programming are a major pain in the ass.





edit: turns out (int) doesn't work when you're doing an equation that deals with pointers. *sighs* I guess I'll go with the NUM_THREAD_TASKS*thread and hope things don't break. if not then i'll make a new var, probably global though because the point was to save memory by using a define. the less vars, the more free memory, and the faster the program runs. that and i plan on porting this code to cuda which is extremely memory restrictive being how small the cache is compared to a normal cpu.
Add to Memories
Tell a Friend
on a random note
chopper is the cutest anime character ever ^_^

Add to Memories
Tell a Friend
What the hell is happening to me?
I use to tease Grandma and call her a 'druggy' cuz of all the prescription stuff she would take. Today I counted what I'm taking and I'm talking more prescription meds than Grandma. Gaw ... i'm only 21 not 65 wtf!?!

I wake up and take 4 different types of meds totaling 9 pills.
In 6 hours I take 2 different types of meds totaling 4 pills.
In another 6 hours right before bedtime I take 5 different types of meds totaling 10 pills.
Then in the middle of the night I can take the same thing I take in the middle of the day since it is suppose to be every 6 hours I take the meds but usually I don't. However, sometimes not taking the meds causes so much pain that it causes me to wake up at night and I take the pills anyways.


So yah... I'm a 'druggie' now. Thank you magical drug Fiorinal!! I'm suppose to take it every 6 hours and without it I'm in so much pain I can hardly sit up. Fiorinal truly is a magical drug. Oh, almost forgot: I was prescribed some high powered anti nausea medicine I'm suppose to take with the Fiorinal but so far I've only taken 2 pills. I don't need it. Also, I was prescribed Vicodin to take with the Fiorinal. For half a week I took it every 4 hours but I realized it just made me not all there and didn't remove much of any pain. After that I stopped taking it. The nausea meds are mainly to be combined with the Vicodin.

Also, I'm not suppose to chew anything. I'm not suppose to smile, frown, talk, or move my mouth much at all. The problem is I'm starving!! I've been on this diet for a week and there is only so much pudding one can take, even if it is one of my fav dessert foods. Today I bought tons of Slim Fast. If I can't eat anything then I'll drink it! So far today I've had a milk shake, 3 cans of slim fast, and string cheese (not sure if I'm allowed to have that, but whatever). What I need to do is find someone who knows what the hell mead is so they can show me some good liquid bread. I don't mind a side effect of being drunk. ;)

So yah......


I don't often post about myself and usually post random funny youtube links and stuff but honestly I'm getting tired it all. I hope this post doesn't bore you.
Add to Memories
Tell a Friend
CUDA
Anyone know CUDA? http://en.wikipedia.org/wiki/CUDA

If anyone knows the lang I'm thinking about learning it. I was just curious about general input from anyone with first hand knowledge.
Add to Memories
Tell a Friend
Can someone explain this to me please?
On my RSA decryption program I might run a number that takes 14.8 seconds for my computer to decrypt using 2 threads. I have a core 2 duo so obviously using 2 threads is the default set for my computer but if I change it to 1 thread that 14.8 seconds should be about 29.6 seconds right? Instead it is 32.1 seconds to factor the semiprime.

In every situation I try running 2 threads gives more than a 2x speed increase than 1 thread. I didn't think it would be possible to get much over a 1.8x speed increase let alone more than a 2x speed increase.

So does anyone know why this happens? Why has adding threads giving such a speed increase? My guess is since the cache is shared (L3 or L2 is it? whatever) the threads can pull from the same memory. This sounds plausible but I'm using fork() and fork makes each thread a 100% different program so 2 threads is really 2 programs running. I am not using global variables so the to 'threads' shouldn't be able to share the same memory even if they wanted to.


*is confused*
Add to Memories
Tell a Friend
RSA decrypter v1 completed - codename project luck :P
note: doc gave me some meds that get rid/remove the pain from my migraine so I'm doing good. No need to worry! ^_^

So, what do you do when you have a migraine that lasts for almost a week strait, makes it to painful to play video games or just about anything? Program, that is what! -yah i'm a geek ;)

In the last 48 hours I started a program that would decrypt RSA. It seemed like a fun challenge and in the past I wrote a formula that sqrt() instead of mod() -er % thinngy. divided, you know? - and I honestly thought it would perform slower than brute force but after making it and a brute force version back to back at slowest my program is about 300 times faster. However, it averages at 400 to 600 times faster for most rsa number cracking. I'm not going to get into details right now, but so far this project has been a lot of fun.

On day one I wrote most of v1. It was under 1 page in size for the whole program (obviously not including the header files) and was quite simple to write. I was pleased with the results. On day two I was curious about threading. I have a core 2 duo in my comp and my program runs at a max 99.6% cpu out of 200%. wonderful... So I spent at least three hours learning POSIX linux threading stuff but it turns out to be C and not C++ even if I did get most of it working in C++. Geez, even the tutorials said C++. liars! So I looked at wrappers. There are tons of C++ wrappers but none of them stood out and I was in a bad mood spending half my day wasted so i was like, "fuck it" and I searched for unix's fork() command stuff. It is well documented but there are not really any good tutorials I could find. I know what you're thinking, 'fork!?! that isn't productive! you shouldn't use it!' blah blah blah. It ended up working out really well after I gave up on the tutorials and dived into the direct documentation.

So now my program threads and I set a #define NUM_THREADS up default to 2 right now cuz, you know, core 2 duo and I expected a max of a 1.8x increase but instead I got, as far as I can tell, a full blown 2x speed increase! ok, maybe a 1.99999x increase or something but my program is breathing fire right now! ;)


So, anyways, if you've made it this far either you're crazy, bored, or know what the hell I'm talking about. For the latter: If you run osx I can compile you a version if you want to check out. I currently don't have any user input though. the RSA= is a define as well as the brute force number to start. All that is required is osx 10.5.1 or better. Sorry but 10.4 isn't 64-bit and this is a x86_64 program only. Also, I'm to lazy to look it up but if you run linux and know how I can compile it without booting into a linux distro I'd be happy to. still required: 64bit os so 64bit linux. Oh and windows users are out of the loop. Windows, linux, and unix are all fucking crazy retarded when it comes to threads. Windows has its own way of doing it and therefor my program is not cross comptable unless I install a 64 bit win xp or vista and compile it directly on the OS. oh also, did I forget to mention that I'd have to chance most of the program too? not really fun if you ask me. maybe I should have used a universal thread wrapper that works for linux and windows for cross computability. oh well...
Add to Memories
Tell a Friend
rofl - bush really is a moron
Add to Memories
Tell a Friend
wisdom teeth are a major pain
I got my wisdom teeth pulled out last thursday. I thought in a couple of days I'd be out and about like normal but I'm still in a lot of pain. I have work next friday and I'm worried. At the rate I'm going I will not be up to par to be raggs for all the kids.

in the mean time:

to bad smiling let alone laughing hurts right now but I still got a kick out of this.
Da Bunny!
Danielle
User: [info]razzlfraz
Name: Danielle
About me:
Just a friendly fur living in the Santa Rosa area of California. I am super big on fursuits! And, I love Taurath dearly. *hugs!* :D

Anything you want to know about me don't hesitate to IM and ask me. :)
Recent Entries:
tags