Re: source.f random error

From: Mary Chin <mary.chin_at_cern.ch>
Date: Tue, 23 Oct 2012 19:29:47 +0200

Hello Josh,

The crash is due to the following line in your source.f:
PMUFIN = SQRT(dble(emutry**TWOTWO) - dble(AM(IONID)**TWOTWO))
in an attempt to take the square root of a negative number.

:) mary

On Tue, 16 Oct 2012, Joshua Albert wrote:

> Hi,
>
> I've been trying to set up a cosmic-ray muon distribution for an underground lab. I have created a source.f file that uses empirical distributions for the angle and energy of the muons, and I'm sending them through an empty box (for now, just to demonstrate the spectrum). Unfortunately, I keep getting an error that kills the process:
> Floating point exception(core dumped).
>
> Making things more difficult, this error only happens randomly, so changing the random number seed can change how many events get run before the bug emerges, if it does emerge (I don't typically search past the first few thousand events). I can confirm, however, that the attached source.f and .inp files do produce the bug within the first thousand events, at least on the couple systems I have tested it on.
>
> Any idea what is causing this? I'm doing a very simple monte-carlo loop to get the distributions, and I was careful to use double precision all over the place. Nothing seems special about the last event generated before the crash. Any help is appreciated.
>
> Thank you,
>
> Josh Albert
>
>
>
Received on Wed Oct 24 2012 - 09:26:49 CEST

This archive was generated by hypermail 2.2.0 : Wed Oct 24 2012 - 09:27:20 CEST