Dear All,
I checked this http://www.neuron.yale.edu/phpBB/viewto ... inux#p5758
but I already modify what possible and I am still getting the same problem: My simulation produces different results running on windows or linux. The only factor I could suspect of as culprit is that I am using random numbers to set the amplitude of some current inputs onto the cells and another to create my connectivity, of course also with use_mcell_ran4(1),
could any of you tell me if the random generator can produce that behavior, from windows to linux, changing results?
I ran the same simulation in versions 5.8 5.9 7.0 and 7.1 on windows xp (32bit),7(64bit) (precompiled version), producing always the same result but on ubuntu (X_86_64bit) it fully changed..
Thanks in advance for ANY advice
OJAG
same simulation win/linux different results.... why?
-
- Site Admin
- Posts: 6394
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: same simulation win/linux different results.... why?
You have the code, so you have the solution at hand. Why don't you insert print statements into your program so that every time your program picks a random number, it prints the value of that number? Then you can answer your own question, and tell everybody else what you found.
Re: same simulation win/linux different results.... why?
Thanks for the tip Ted,
My results were as follows
winXP NEURON7.0 //// UBUNTU X86_64 /// win_7_64bit NEURON7.1
r=0.64354531 - r=0.82241427 - r=0.64354531
r=0.16762013 - r=0.008886788 - r=0.16762013
r=0.36580191 - r=0.15383027 - r=0.36580191
r=0.25242554 - r=0.63635059 - r=0.25242554
r=0.92979875 - r=0.84966693 - r=0.92979875
r=0.8741479 - r=0.6223758 - r=0.8741479
r=0.39690984 - r=0.5343043 - r=0.39690984
r=0.46282246 - r=0.8210683 - r=0.46282246
r=0.95720508 - r=0.15385635 - r=0.95720508
r=0.74672166 - r=0.52208868 - r=0.74672166
According to this and if I don't misunderstand the result, the constructor of the generator uses differently the seed to generate the numbers stream on windows and on linux and it doesn't depend on the 32 or 64-bit architecture. Is that right Ted? if so/not could you post here some references about this point?
Thanks a lot,
OJAG
My results were as follows
winXP NEURON7.0 //// UBUNTU X86_64 /// win_7_64bit NEURON7.1
r=0.64354531 - r=0.82241427 - r=0.64354531
r=0.16762013 - r=0.008886788 - r=0.16762013
r=0.36580191 - r=0.15383027 - r=0.36580191
r=0.25242554 - r=0.63635059 - r=0.25242554
r=0.92979875 - r=0.84966693 - r=0.92979875
r=0.8741479 - r=0.6223758 - r=0.8741479
r=0.39690984 - r=0.5343043 - r=0.39690984
r=0.46282246 - r=0.8210683 - r=0.46282246
r=0.95720508 - r=0.15385635 - r=0.95720508
r=0.74672166 - r=0.52208868 - r=0.74672166
According to this and if I don't misunderstand the result, the constructor of the generator uses differently the seed to generate the numbers stream on windows and on linux and it doesn't depend on the 32 or 64-bit architecture. Is that right Ted? if so/not could you post here some references about this point?
Thanks a lot,
OJAG
-
- Site Admin
- Posts: 6394
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: same simulation win/linux different results.... why?
Very strange. I just tried this very simple programunder Centos 5.5 (32 bit, Linux), Windows 2000 (32 bit), and, on a different machine, Windows 7 (64 bit), and got the same results each time:
0.5340179
0.36924247
0.65320583
0.63449432
0.35163532
0.92944949
0.30661334
0.0043154789
0.85162027
0.8414458
0.90359852
Then I switched to the MCellRan4 generator by inserting
r.MCellRan4()
right after the
r = new Random()
statement, and this time the result was
0.86599038
0.004729443
0.023549526
0.80911988
0.030454614
0.88158147
0.66938499
0.62269264
0.16661648
0.30357997
0.4439619
under all 3 operating systems.
So whereever the bug is--in NEURON, or in your hoc code--it's probably very subtle. If you email me just the files that are necessary to reproduce the problem, I'll see what I can find out.
ted dot carnevale at yale dot edu
Code: Select all
objref r
r = new Random()
print r.uniform(0,1)
for i=1,10 print r.repick()
0.5340179
0.36924247
0.65320583
0.63449432
0.35163532
0.92944949
0.30661334
0.0043154789
0.85162027
0.8414458
0.90359852
Then I switched to the MCellRan4 generator by inserting
r.MCellRan4()
right after the
r = new Random()
statement, and this time the result was
0.86599038
0.004729443
0.023549526
0.80911988
0.030454614
0.88158147
0.66938499
0.62269264
0.16661648
0.30357997
0.4439619
under all 3 operating systems.
So whereever the bug is--in NEURON, or in your hoc code--it's probably very subtle. If you email me just the files that are necessary to reproduce the problem, I'll see what I can find out.
ted dot carnevale at yale dot edu
-
- Site Admin
- Posts: 6394
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: same simulation win/linux different results.... why?
Trying your code with NEURON under Win 2K (32 bit), Win 7 (64 bit), and 32 bit CentOS 5.5 I get the same results as you did with Win XP and 7. But with NEURON under 64 bit CentOS 5.5 the results were the same as you got with 64 bit Ubuntu.