Re: [fluka-discuss]: problem of writing a file from source routine

From: Francesc Salvat-Pujol <>
Date: Tue, 12 Dec 2017 17:28:04 +0100

Dear David,

Did the suggested standalone steps work?

Make sure that your input file has a SOURCE card and Flair-wise double
check that in the Run panel the custom executable is properly selected.

If this (or detailed PS below) still fails, send your .inp and .flair



Also using Flair a quick test produces the *_fort.97 files.
Starting from a fresh directory containing only your

1) Change to that directory and launch: flair &

2) Create an input file from the basic template and add a SOURCE card.

3) Save as tst.inp (make sure it has a SOURCE card).

4) Go to the Compile panel

5) Add source_changed.f

6) Make sure you are linking with lfluka

7) Click on build

8) Name your executable foobar

9) Take a look at your working directory. You have to see the newly
created files source_changed.o and foobar

10) Go to the Run panel

11) Add a new run called tstrun

12) Make sure that Executable "foobar" is selected

13) Run for a couple cycles and a small number of particles just to

Doing exactly that one obtains the *_fort.97 files.

Also make sure that in your *.out files you see the
  "=== User written source: ==="

On Tue, Dec 12 2017, at 12:21 +0100, David Sangcheol Lee wrote:
>Thank you for replying me back. Yes I was intended to put the unit 97 instead of 99. That was the typo when I sent the first email.
>Regards to linking file, I compiled the source file and created the output with the name called test.o inside of FLAIR COMPILE tab.
>I ran the simulation in FLAIR with linking this test.o file. The simulation finishes okay but no fort.97 file.
>I believe this is same as what you explained as long as FLAIR follows the same command.
>Thank you for your help
>-----Original Message-----
>From: Francesc Salvat Pujol
>Sent: 12 December 2017 12:08
>To: David Sangcheol Lee <>;
>Subject: Re: [fluka-discuss]: problem of writing a file from source routine
>Dear David,
>You are writing out to unit 97, not 99.
>Running a quick test, e.g.:
> $FLUPRO/flutil/fff source_changed.f
> $FLUPRO/flutil/lfluka -m fluka -o foobar source_changed.o
> $FLUPRO/flutil/rfluka -e foobar -N 0 -M 5 tst
>...being tst.inp a valid input file containing a SOURCE card, one gets
>*_fort.97 output files populated with your coordinates.
>Make sure there is no error in the linking process, that you are running the correct binary, and that you pass a SOURCE card in your input file.
>Let us know if the issue persists.
>On Tue, Dec 12 2017, at 09:04 +0000, David Sangcheol Lee wrote:
>>Dear fluka expert
>>I have added few extra lines in the source.f for the parabolic beam distribution. I
>>n order to make sure that the beam coordinates are correct, I placed WRITE(97,*) XFLK (NPFLKA) , YFLK (NPFLKA), ZFLK (NPFLKA)
>>Where XFLK (NPFLKA) = rad*sin(theta)
>> YFLK (NPFLKA) = rad*cos(theta)
>>However, after multiple times, there is no fort file with unit 99 created and I cannot figure out why it is not producing the file.
>>Could someone explain it to me what I did wrong?
>>I enclose the source file in this.
>>Thank you
>>Kind regards
>>[CERN-logo] David Sangcheol Lee
>> European Organisation for Nuclear Research
>> 1211 Geneva 23, Switzerland
>Francesc Salvat Pujol
>CH-1211 Geneva 23
>Tel: +41 22 76 64011
>Fax: +41 22 76 69474

Francesc Salvat Pujol
CH-1211 Geneva 23
Tel: +41 22 76 64011
Fax: +41 22 76 69474
You can manage unsubscription from this mailing list at
Received on Tue Dec 12 2017 - 18:57:27 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 12 2017 - 18:57:29 CET