ran2 verus ran3

Message boards : Rosetta@home Science : ran2 verus ran3

To post messages, you must log in.

AuthorMessage
hugothehermit

Send message
Joined: 26 Sep 05
Posts: 238
Credit: 314,893
RAC: 0
Message 5677 - Posted: 9 Dec 2005, 6:47:05 UTC

I still don't think this is rosetta's problem
as I said here

But just to be sure, I need someone(s) to confirm these results.

I have a feeling that either I screwed up somewhere or my 10 odd year old compiler isn't up to the task.

here if all is well, are both my (quick and dirty) programmes (as .cpp) and the results (it's ziped).

Called ran2ran3.zip it contains
ran2.cpp
ran3.cpp
random_numbers.txt

Though they are realy C programmes and I belive it's all ANSI C compatable (just a little out of date) any C compiler should be able to compile them (well maybe ?).

I dno't know if I'm or my compiler is doing something wrong as the ran2 fuction isn't changing the output with different seeds, though I must admit I was only using the ran2 fuction as a independant source of numbers and wanted to see if ran3 was biased ( so really didn't care about the (output from ran2) numbers themselves just wanted some numbers to check ran3 on)

But from what I see is that ran3 is worse at small numbers (most likely because the mixed long interger and float calulations is giving rounding differances).

Just checked the free host I picked on, I may of got a dud, I can sent the ziped file to some people but remember I'm on dial-up. Anyone know of a good free host that accepts broswer uploads (without me biting Johnathon again ?
ID: 5677 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
hugothehermit

Send message
Joined: 26 Sep 05
Posts: 238
Credit: 314,893
RAC: 0
Message 5779 - Posted: 10 Dec 2005, 7:17:28 UTC

The free host I picked doesn't play nice with Mozilla, but works with Opera.



ID: 5779 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Beezlebub
Avatar

Send message
Joined: 18 Oct 05
Posts: 40
Credit: 260,375
RAC: 0
Message 5861 - Posted: 11 Dec 2005, 14:37:03 UTC - in response to Message 5779.  

The free host I picked doesn't play nice with Mozilla, but works with Opera.




ftp(dot)boincforum(dot)info

user: Boincuser@boincforum.info

P/W : boinc

Make your own folder
Delete when finished please
can be used for avatars, images, anything to do with Boinc related projects.

e6600 quad @ 2.5ghz
2418 floating point
5227 integer

e6750 dual @ 3.71ghz
3598 floating point
7918 integer


ID: 5861 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
hugothehermit

Send message
Joined: 26 Sep 05
Posts: 238
Credit: 314,893
RAC: 0
Message 5921 - Posted: 12 Dec 2005, 4:06:36 UTC

Thanks Beezlebub,

But by the look of the massive amounts of downloads, I'm not sure you could keep up, there was 1, and that was me checking it was OK I think :)

I'll keep you in mind if I have any most fantastic ideas :)
ID: 5921 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Beezlebub
Avatar

Send message
Joined: 18 Oct 05
Posts: 40
Credit: 260,375
RAC: 0
Message 5926 - Posted: 12 Dec 2005, 5:31:31 UTC - in response to Message 5921.  

Thanks Beezlebub,

But by the look of the massive amounts of downloads, I'm not sure you could keep up, there was 1, and that was me checking it was OK I think :)

I'll keep you in mind if I have any most fantastic ideas :)


It was set up originally for moderators on CPDN but I made it available to anyone that needs some space for Boinc related data (images,avatars a place to put long involved posts and link to it, etc) It is my server so unless I die, it will be up. As to bandwidth, as u noted it is not suffering ! :)
Feel free to mention the storage to others as I'm not on the boards too often.

e6600 quad @ 2.5ghz
2418 floating point
5227 integer

e6750 dual @ 3.71ghz
3598 floating point
7918 integer


ID: 5926 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote
Enno Ruijters

Send message
Joined: 23 Sep 05
Posts: 2
Credit: 3,194,827
RAC: 0
Message 6147 - Posted: 13 Dec 2005, 17:52:08 UTC

I compiled the ran2 on my VC6++ and the outputs indeed don't seem to change when using different seeds according to the main() in the file in your zip.

I think this is because the idum2 variable in the ran2 function is set during the initialization with the negative value, and then becomes independant from the seed.
This would mean that for the outputs to change you'd have to get a lot of outputs so that the array is reset (iv[j] = *idum;).
So I'm guessing you're supposed to use a random negative variable as the seed (to initialize it) and then don't touch it anymore. That seemed to work for me.

Ran3 looks like it does that even worse (after the seeding with -1, any change won't matter). So you might want to change that one, too.
ID: 6147 · Rating: 0 · rate: Rate + / Rate - Report as offensive    Reply Quote

Message boards : Rosetta@home Science : ran2 verus ran3



©2024 University of Washington
https://www.bakerlab.org