<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hy all,
<p>That's true, a double is coded on twice the length of a long int. Thus
we should not have any trouble in counting. The 'double' counter is thus
ok. Anyway, I do not undestand why sometimes, the comparison expression
to test the end of the simulation just stucks, and the simulation never
ends.
<p>I will study that further, and that's why I passed to long, to be sure
the counter is precise, and does not contain an uncertainty. Sure using
a long limits the counting to 2e9 (or 4e9 is unsigned).
<br>Probably usng a 'long double' would even be better.
<p>So, sorry !
<p>For the tme being, please use the 1.4.1 version (with ncount and run_num
as doubles).
<br>I will try to put a kind of basic debugger for 'stuck' simulations
in the signal hander.
<p>Cheers.
<br>Emmanuel.
<p>Rob Kreuger wrote:
<blockquote TYPE=CITE>Hello,
<p>as far as I could figure out a double has 15 significant digits, so
<br>counting should work up to something like 10^14. Beyond that it won't
work
<br>anymore. But a 100P neutrons should be enough for the moment, unless
you
<br>have a supercomputer. So I can't see why Emmanuel still has problems.
<p>cheers,
<br>Rob Kreuger
<p>farhi> Hy,
<br>farhi>
<br>farhi> I just realized that the '2e9' bug is still there, but more
vicious.
<br>farhi> in fact, I passed ncount and run_num to long, because there
may be
<br>farhi> rounding errors when using float numbers, and comparisons. I
got
<br>farhi> unending simulations...
<br>farhi>
<br>farhi> Please use the attached files ! (lib/mcstas)
<br>farhi> Changing that requires to update Monitor_nD... (lib/mcstas/monitors)
<br>farhi>
<br>farhi> Cheers.
<br>farhi>
<br>farhi> --
<br>farhi> What's up Doc ?
<br>farhi> --------------------------------------------
<br>farhi> Emmanuel FARHI, <a href="http://www.ill.fr/tas/people/Farhi.html">http://www.ill.fr/tas/people/Farhi.html</a>
\|/ ____ \|/
<br>farhi> CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble
~@-/ oO \-@~
<br>farhi> 6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France
/_( \__/ )_\
<br>farhi> Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06
\__U_/
<br>farhi>
<br>farhi>
<br>farhi>
<p>+--------------------------------------------------------------------+
<br>| Rob Kreuger
| Email: Rob.Kreuger@iri.tudelft.nl |
<br>| Tel: (+31) 015 278 3900
|
|
<br>+--------------------------------+-----------------------------------+
<br>| Radiation Technology group | Neutron Scattering
group |
<br>| GEM project
| Scans PROJECT
|
<br>| Tel: (+31) 015 278(5244) | Tel:
(+31) 015 278(6814)
|
<br>| Fax: (+31) 015 278(6422) | Fax:
(+31) 015 278(8303)
|
<br>+--------------------------------+-----------------------------------+
<br>| IRI
| Mekelweg 15
|
<br>| Delft University of Technology | 2629 JB Delft
|
<br>| Tel: (+31) 015 278(5022) | Netherlands
|
<br>+--------------------------------------------------------------------+</blockquote>
<pre>--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, <A HREF="http://www.ill.fr/tas/people/Farhi.html">http://www.ill.fr/tas/people/Farhi.html</A> \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/</pre>
</html>