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

From: Francesc Salvat-Pujol <Francesc.Salvat.Pujol_at_cern.ch>
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
files.

Cesc




PS:

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

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
check.

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

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

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 <david.sangcheol.lee_at_cern.ch>; fluka-discuss_at_fluka.org
>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.
>
>Cesc
>
>
>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)
>> ZFLK (NPFLKA) = ZBEAM
>>
>>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
>>
>>Cordialement
>>
>>[CERN-logo] David Sangcheol Lee
>>CERN / HSE-RP
>> European Organisation for Nuclear Research
>> 1211 Geneva 23, Switzerland
>>Email: david.sangcheol.lee_at_cern.ch
>>
>
>
>
>
>
>--
>Francesc Salvat Pujol
>CERN-EN/STI
>CH-1211 Geneva 23
>Switzerland
>Tel: +41 22 76 64011
>Fax: +41 22 76 69474

--
Francesc Salvat Pujol
CERN-EN/STI
CH-1211 Geneva 23
Switzerland
Tel: +41 22 76 64011
Fax: +41 22 76 69474
__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
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