Re: [fluka-discuss]: [Fwd: Run time error if cycle number is greater than 2]

From: Paola Sala <paola.sala_at_mi.infn.it>
Date: Fri, 21 Aug 2020 11:21:32 +0200

Hello
it is very difficult to debug user routines, especially when not all the
elements are available (dada file).
From the log file, you can see that the problem is indeed in your source.f
routine.
I suspect that something goes wrong in the calculation of the z cosine,
resulting in a squareroot of negative value. This can come from rounding
of the other two cosines, maybe written to disk with too few significant
digits.
Maybe it would be better to keep all the three of them as read from the
data file, and apply a normalisation a posteriori on all three.
But, of course, I am not sure that this is te reason. You can again print
values (only for the cycle that crashes) and/or inspect the core file with
the gdb linux utility.

Regards
Paola
> Dear FLUKA experts,
>
> I am re-sending this mail if anyone can help me to solve the issue.
>
>
> ---------------------------- Original Message ----------------------------
> Subject: Run time error if cycle number is greater than 2
> From: riyadey_at_barc.gov.in
> Date: Mon, August 17, 2020 2:51 pm
> To: fluka-discuss_at_fluka.org
> Cc: paola.sala_at_mi.infn.it
> --------------------------------------------------------------------------
>
> Dear Paola,
>
> Thank you for the explanation. I have modified the source file and took
> print out of 50 lines for checking and it is working properly. I have used
> this source file with a fluka input containing voxel information. The
> source file is compiled properly. But i am getting run time error for a
> history of 1E+8.
>
> I tested it for 1000 histories also.For 2 cycles, there is no error. If
> the cycle is greater than 2, it is showing finished with errors.
>
> I have added the modified source file also and two pngs where the list of
> output files for 1st cycle and 3rd cycle are shown. Also the error files,
> log files for 3rd cycle are attached.
>
> Can you please guide me how to solve this ??
>
>
>
>
>> Hello
>> First of all, It would be better to place the reading of your file
>> inside
>> the IF-block starting with "IF (LFIRST)" , so that it is read only
>> once.
>> As it is now, it is re-read at each primary.
>>
>> Then, I do not know how the txt file is formatted, but I suppose that
>> you
>> have one line for each (x,y,z,E,wt,u,v,w) set? If yess, the read
>> statement
>> is not correct: at each READ, one record will be load , I mean one line,
>> and only one quantity will be read in from this record, the first one,
>> and
>> assigned to A(i). Thus, the code will try to read 1946728 LINES, not
>> 1946728 values.
>> Again, if my assumption is correct, you can do two things:
>> A loop on 243341 lines, reading 8 separate vectors (which will make
>> things
>> much easier) : read (30,*) x(i),y(i),z(i),E(i),wt(i),u(i),v(i),w(i)
>> A single read, without loop : read(30,*)A
>> I suggest in both cases to add prinout lines to check that everything is
>> working correctly.
>> regards
>> Paola
>>> Dear experts,
>>>
>>> I am resending this mail since in the previous mail, there was one
>>> attachment (fluence.txt) which has large mb size and thus I received
>>> the
>>> following instruction
>>> Sorry, but your message was blocked by the system with the message:
>>> "Message too long (>10000000 chars)"
>>>
>>> I hope, with out this file, still my issue can be addressed.
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------- Original Message
>>> ----------------------------
>>> Subject: Error generated while reading x,y,z,energy,u,v,w from a file
>>> using source.f
>>> From: riyadey_at_barc.gov.in
>>> Date: Fri, August 14, 2020 4:28 pm
>>> To: fluka-discuss_at_fluka.org
>>> --------------------------------------------------------------------------
>>>
>>> Dear experts,
>>>
>>> I am trying to read position coordinates, energy, weight and
>>> directional
>>> cosines from a file (see the attached fluence.txt file). Total number
>>> of
>>> data are 1946728 and if we consider (x,y,z,E,wt,u,v,w) as a set, then
>>> this
>>> number will be 243341 (=1946728/8). I want to store these data in an
>>> array
>>> A and subsequently I have used this A to assign XFLK (NPFLKA) and other
>>> variables.
>>>
>>> Although there is no error in the compilation, the timed out error is
>>> appearing and in the log file the following errors are generated.
>>>
>>> At line 61 of file source1.f (unit = 30, file = '../fluence.txt')
>>> Fortran runtime error: End of file
>>>
>>> Error termination. Backtrace:
>>> #0 0x7f1b456e6aed in ???
>>> #1 0x7f1b456e7605 in ???
>>> #2 0x7f1b456e82ab in ???
>>> #3 0x7f1b459280a3 in ???
>>> #4 0x7f1b45921316 in ???
>>> #5 0x7f1b459222b1 in ???
>>> #6 0x55f34f7cc910 in source_
>>>
>>> Can you please guide me to solve this issue ?
>>
>>
>> Paola Sala
>> INFN Milano
>> tel. Milano +39-0250317374
>> tel. CERN +41-227679148
>>
>>
>


Paola Sala
INFN Milano
tel. Milano +39-0250317374
tel. CERN +41-227679148

__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Fri Aug 21 2020 - 11:21:32 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 21 2020 - 13:24:09 CEST