Re: Debugging stochastic programs
- From: "Dr Ivan D. Reid" <Ivan.Reid@xxxxxxxxxxxx>
- Date: Mon, 23 Jan 2006 14:08:29 +0000 (UTC)
On 23 Jan 2006 04:40:13 -0800, AN O'Nymous <a_n_onymous80@xxxxxxxxxxx>
wrote in <1138020013.152560.292130@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
> Dr Ivan D. Reid wrote:
>> Turn on bounds checking, and look very carefully for mismatched
>> sub-program parameters (esp. if sections are compiled separately).
> It is one program compiled as a whole, using Intel FC 8.0 for Linux.
> How do I turn on bounds checking?
I looked at the on-line documentation for V9.0; probably -CB or
-check bounds in your compiler flags. If you are using arrays heavily, this
can significantly increase run times, unfortunately.
> I don't have such a line in my code but an example of what I'm saying
> would be:
> Call rng(random,seed)
> temp = 1.0/random
> The above code would be fine for all values except for a particular
> random value of 0.
Yes, of course your documentation should note whether the RNG
returns [0,1) (the usual) or (0,1] or [0,1] (less usual). I had to change
my logic once in a MC for just this reason, tho' it was log(0.0) rather than
dividing by zero.
If you think it's some particular value and you can isolate it to
one particular routine, you could try excercising that routine with all
possible random numbers in sequence (typically (0 to 2^24-1)/2^24 for single
precision).
> How do people normally debug a stochastic program that only crashes
> after 1 day and is otherwise fine in 99.9% of the other runs?
With great care and patience.
--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
.
- References:
- Debugging stochastic programs
- From: AN O'Nymous
- Re: Debugging stochastic programs
- From: Dr Ivan D. Reid
- Re: Debugging stochastic programs
- From: AN O'Nymous
- Debugging stochastic programs
- Prev by Date: Compiler issue or something in F95 standard?
- Next by Date: Re: Compiler issue or something in F95 standard?
- Previous by thread: Re: Debugging stochastic programs
- Next by thread: Re: Debugging stochastic programs
- Index(es):
Relevant Pages
|