# Problem with fluka\_src\_converter.py

**URL:** <https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511>\
**Category:** Running and Runtime Errors\
**Created:** [12 May 2020 10:53 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511 "2020-05-12T10:53:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fferrull](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/7bcc69/32.png) [@fferrull](https://fluka-forum.web.cern.ch/u/fferrull)\
**Post date:** [12 May 2020 10:53 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/1 "2020-05-12T10:53:47Z")

</div>

Dear FLUKA experts, I want to run an input file with an old source,f routine. I saw your previous post regarding the use of fluka\_src\_converter.py. I tried just typing fluka\_src\_converter.py myroutine\*.f (myroutine\* is the actual name of my source.f file) but I got a bash error:

-bash: / cluster/temp/Software/2011.3/flutil/fluka\_src\_converter.py: /usr/bin/python3: No such file or directory

What should I do? I’m not used to Linux and I don’t know if I am doing something wrong.

Thank you.

Francesca

---

<div class="post-metadata">

**Author:** ![dbozzato](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@dbozzato](https://fluka-forum.web.cern.ch/u/dbozzato)\
**Post date:** [12 May 2020 12:16 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/2 "2020-05-12T12:16:01Z")

</div>

Dear Francesca,  
you should enable Python3 first. On the cluster you can try with:  
 scl enable rh-python36 bash (You can check then the Python version with python --version)

Then you could do something like:  
$ python $FLUKACERN/bin/fluka\_src\_converter.py myroutine.f  
(where $FLUKACERN is /path/to/fluka2011.3 which on the cluster is already set)

Davide

---

<div class="post-metadata">

**Author:** ![fferrull](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/7bcc69/32.png) [@fferrull](https://fluka-forum.web.cern.ch/u/fferrull)\
**Post date:** [12 May 2020 13:13 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/3 "2020-05-12T13:13:46Z")

</div>

> [@dbozzato](#):
>
> $ python $FLUKACERN/bin/fluka\_src\_converter.py myroutine.f

Dear Davide,

the fluka\_src\_coverter.py now works fine, it coverts the file without giving me error. However when I compile the source I still get this error:

Error: Can’t open included file ‘(DBLPRC)’

Thank you,  
Francesca

---

<div class="post-metadata">

**Author:** ![dbozzato](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@dbozzato](https://fluka-forum.web.cern.ch/u/dbozzato)\
**Post date:** [14 May 2020 15:17 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/4 "2020-05-14T15:17:31Z")

</div>

Dear Francesca,  
sorry for the late reply. I have tried with some old routines that I still have and everything works fine, I can’t reproduce your problem. Could you please inspect your routine after the conversion? Instead of  
`INCLUDE '(DBLPRC)'`  
you should now have  
`INCLUDE 'dblprc.inc'`  
and the analogous for the other includes (no more parenthesis, all small caps and .inc extension)  
If this is not the case, could you post the output from terminal when you run fluka\_src\_converter.py?

Cheers,  
Davide

---

<div class="post-metadata">

**Author:** ![fferrull](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/7bcc69/32.png) [@fferrull](https://fluka-forum.web.cern.ch/u/fferrull)\
**Post date:** [15 May 2020 07:09 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/5 "2020-05-15T07:09:13Z")

</div>

Dear Davide,

thank you for your help. At the end I “solved” the problem just changing all the include in the old routine, with the new includes (that I took from a new source routine). It seems it works, I got the spectrum that I want.

As you suggested, the fluka\_src\_converter doesn’t work actually; even if I don’t get an error, the old routine doesn’t change. I still do not know why, maybe i will try with other old routine.

Thank you,  
Francesca

---

<div class="post-metadata">

**Author:** ![vasilis](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/vasilis/32/16_2.png) [@vasilis](https://fluka-forum.web.cern.ch/u/vasilis)\
**Post date:** [15 May 2020 08:57 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/6 "2020-05-15T08:57:41Z")

</div>

Francesca, could you please upload your routine where the converter doesn’t work, so we can correct it

---

<div class="post-metadata">

**Author:** ![fferrull](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/7bcc69/32.png) [@fferrull](https://fluka-forum.web.cern.ch/u/fferrull)\
**Post date:** [15 May 2020 09:57 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/7 "2020-05-15T09:57:19Z")

</div>

Dear Vasilis and Davide,

before attaching you the source file, I tried again and it works: fluka \_src\_coverter.py converts my source routine, it is succeffully compiled on FLUKA and I get the results I expected.  
I was probably doing something wrong. Thank you anyway for your help.

Regards,  
Francesca

---

<div class="post-metadata">

**Author:** ![horvathd](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/horvathd/32/10584_2.png) [@horvathd](https://fluka-forum.web.cern.ch/u/horvathd)\
**Post date:** [18 May 2020 06:57 UTC](https://fluka-forum.web.cern.ch/t/problem-with-fluka-src-converter-py/511/8 "2020-05-18T06:57:57Z")

</div>

Closed on 18 May 2020 06:57 UTC


