Page 1 of 1

Different results on i686 and x86_64 machines

Posted: Thu May 21, 2009 5:48 pm
by mjb7
Image

Any ideas why I get very different results when I compile and run my code on an i686 (32-bit) Linux machine versus an x86_64 (64-bit) Linux machine? See plot above. These plots were generated using the exact same .mod and .hoc files.

P.S. The plot shows the response of a thalamocortical relay neuron to a constant hyperpolarizing current. An H-current and T-type Calcium current are supposed to interact and cause the cell to rebound (as in the red case).

Re: Different results on i686 and x86_64 machines

Posted: Thu May 21, 2009 7:37 pm
by mjb7
P.S.S. - I tried NEURON 6.0 and 7.0, with similar results.

Re: Different results on i686 and x86_64 machines

Posted: Fri May 22, 2009 8:23 am
by ted
Shouldn't happen. To diagnose the problem, it will be necessary to reproduce it. Can you zip up just enough code to reproduce the result, and send it to me
ted dot carnevale at yale dot edu
?

Re: Different results on i686 and x86_64 machines

Posted: Tue May 26, 2009 3:30 pm
by ted
The problem was caused by an error in a mod file.

Before comparing results of 32 vs 64 bit simulations, I started checking the mod files with modlunit--which finds syntax errors as well as units inconsistencies. Its chief limitation is that once it finds and reports an error, it quits, so using modlunit is a matter of making repeated "test and revise" cycles.

modlunit ishift.mod
first reported this trivial units inconsistency

Code: Select all

units:  1

units:  0.001 m2-kg/sec2-coul
The units of the previous two expressions are not conformable
 at line 55 in file ihshift.mod
       evaluate_fct(v,vsh<<ERROR>>)
which won't affect simulation results, and is very easy to correct. vsh was a STATE that was not assigned any particular units, so replacing

Code: Select all

PROCEDURE evaluate_fct(v(mV), vsh(mV)) {
with

Code: Select all

: PROCEDURE evaluate_fct(v(mV), vsh(mV)) {
PROCEDURE evaluate_fct(v(mV), vsh) {
eliminated the units inconsistency.

The next pass with modlunit reported

Code: Select all

too few arguments at line 68 in file ihshift.mod
        evaluate_fct(v)<<ERROR>>
This is a serious error--I'm surprised that the code executes. However, this error is also easy to fix. Just replace

Code: Select all

	evaluate_fct(v)
with

Code: Select all

:	evaluate_fct(v)
	evaluate_fct(v, vsh)
mjb7 reported the following:
The curves matched exactly once I corrected the ihshift file (I checked the others, and they didn't have any unit errors).