Still the 2e9...

Emmanuel Farhi farhi at ill.fr
Tue Mar 20 10:10:15 CET 2001


Hy all,

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.

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).
Probably usng a 'long double' would even be better.

So, sorry !

For the tme being, please use the 1.4.1 version (with ncount and run_num as
doubles).
I will try to put a kind of basic debugger for 'stuck' simulations in the signal
hander.

Cheers.
Emmanuel.

Rob Kreuger wrote:

> Hello,
>
> as far as I could figure out a double has 15 significant digits, so
> counting should work up to something like 10^14. Beyond that it won't work
> anymore. But a 100P neutrons should be enough for the moment, unless you
> have a supercomputer. So I can't see why Emmanuel still has problems.
>
> cheers,
> Rob Kreuger
>
> farhi> Hy,
> farhi>
> farhi> I just realized that the '2e9' bug is still there, but more vicious.
> farhi> in fact, I passed ncount and run_num to long, because there may be
> farhi> rounding errors when using float numbers, and comparisons. I got
> farhi> unending simulations...
> farhi>
> farhi> Please use the attached files ! (lib/mcstas)
> farhi> Changing that requires to update Monitor_nD... (lib/mcstas/monitors)
> farhi>
> farhi> Cheers.
> farhi>
> farhi> --
> farhi> What's up Doc ?
> farhi> --------------------------------------------
> farhi> Emmanuel FARHI, http://www.ill.fr/tas/people/Farhi.html   \|/ ____ \|/
> farhi> CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble  ~@-/ oO \-@~
> farhi> 6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France  /_( \__/ )_\
> farhi> Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06     \__U_/
> farhi>
> farhi>
> farhi>
>
> +--------------------------------------------------------------------+
> | Rob Kreuger                    | Email: Rob.Kreuger at iri.tudelft.nl |
> | Tel: (+31) 015 278 3900        |                                   |
> +--------------------------------+-----------------------------------+
> | Radiation Technology group     | Neutron Scattering group          |
> | GEM project                    | Scans PROJECT                     |
> | Tel: (+31) 015 278(5244)       | Tel: (+31) 015 278(6814)          |
> | Fax: (+31) 015 278(6422)       | Fax: (+31) 015 278(8303)          |
> +--------------------------------+-----------------------------------+
> | IRI                            | Mekelweg 15                       |
> | Delft University of Technology | 2629 JB  Delft                    |
> | Tel: (+31) 015 278(5022)       | Netherlands                       |
> +--------------------------------------------------------------------+

--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, http://www.ill.fr/tas/people/Farhi.html   \|/ ____ \|/
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_/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20010320/a540bf74/attachment.html>


More information about the mcstas-users mailing list