[fluka-discuss]: Re: [fluka-discuss]: GDB frame for FLUKA

From: Peter Lysakovski <peter.lysakovski_at_uni-heidelberg.de>
Date: Fri, 01 Apr 2022 13:16:55 +0200

Hi Vladimir,

in the past I had some success debugging user routines by modifying $FLUPRO/flutil/rfluka to call gdb. Somewhere in the rfluka file, there is the line "${EXE} 2>$LOGF 1>$LOGF" which you can replace with "gdb --args ${EXE}". For my version of FLUKA, this is line 303. Before making changes to the rfluka file you should create a backup of it so you can restore normal fluka functionality later.

Best wishes
Peter

On Friday, April 1, 2022 10:04 CEST, Vladimir Babintsev <babintsev_at_ihep.ru> wrote:
 
> Hi,
>
>  I have got arithmetic error inside program when running FLUKA.
>
>  when I use command :
>
>  cd fluka_563/
>  gdb ../x_fluka core.600
>
>   ...
>
> (gdb) l
> 509
> 510
> 511    *  |  Particle momentum
> 512    ***         PMOFLK (NPFLKA) = PBEAM
> 513            PMOFLK (NPFLKA) = SQRT ( TKEFLK (NPFLKA) * ( TKEFLK (NPFLKA)
> 514         &                          + TWOTWO * AM (IONID) ) )
> 515
> 516    *  |
> +----------------------------------------------------------------*
> 517    *  |  |  Check if it is a neutrino, if so force the interaction
> 518    *  |  |  (unless the relevant flag has been disabled)
> (gdb) p NPFLKA
> $1 = 0
> (gdb) p IONID
> $2 = 0
>
>  ....
>
>  I see that many variables are not defined or have strange values
>
>  I think that I have got memory error somewhere....
>
>  So, I would like to run FLUKA under  GDB frame to see
>
>  the previous  event in the proram.
>
>  -> how to run FLUKA inside GDB ?
>
>     general start of my job is :
>
>
>    $FLUPRO/flutil/rfluka  -e x_fluka -N0 -M1  tagW2.inp >&  ouput.txt
>
>
>  thank you,
>
> Vladimir
>
>
>
>
> __________________________________________________________________________
> You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
>
 
 
 
 



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Fri Apr 01 2022 - 14:52:17 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 01 2022 - 14:52:24 CEST