Re: [fluka-discuss]: Error when creating source.f executable

From: Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch>
Date: Sun, 28 May 2017 18:31:38 +0000

Dear Shri,
It’s not a good programming practice to hardcode the number of lines of the file to read.
I set NLINES=10 only for testing, you can avoid it by implementing the pseudocode at the bottom of this email (not tested).

The error is due to the geometry definition.
You have zones with O(1000) bodies and I guess that this can cause the issue.
I recommend you to revise/debug your geometry definition:

  * Remove the bpXXX bodies from the VOID region (they do not appear to be necessary there)
  * Increase the value of NAZ (FLUKA manual, section 8.6)
  * Try to reduce the number of bodies per zone
Maybe it’s worth to go through the slides<https://indico.cern.ch/event/604018/contributions/2435684/attachments/1395449/2242749/06_Geometry_2017.pdf> about the geometry at the FLUKA course.

Best regards, luigi


        PARAMETER (NINMAX=100000)
        SAVE NLINES
….
         CALL OAUXFI(LINE,88,'OLD',IERR)
         IF ( IERR .GT. 0 )
     + CALL FLABRT('SOURCE','Error opening source file '//LINE)
         NLINES = 1
10 CONTINUE
            READ( 88,*,ERR=9999, END=99) EKIN( NLINES )
            NLINES = NLINES + 1
            IF (NLINES.GT.NINMAX) CALL FLABRT('SOURCE','Increase NINMAX')
            GOTO 10
99 CONTINUE
         CLOSE( 88 )



From: Shri Bheesette <srinidhi.bheesette_at_cern.ch>
Date: Saturday, 27 May 2017 at 13:22
To: Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch>
Cc: Joachim Vollaire <joachim.vollaire_at_cern.ch>, Francesco Cerutti <Francesco.Cerutti_at_cern.ch>, FLUKA discussion <fluka-discuss_at_fluka.org>
Subject: Re: [fluka-discuss]: Error when creating source.f executable

Hi Luigi,

Thanks for the source routine.

I see that you have mentioned the NLINES=10, accordingly I modified the spectrum_x3for.dat file to have 10 values. I could have changed the value of NLINES to 68019 as well.

So with NLINES=10 and with 10 values in spectrum_x3for.dat, I compiled the source.f, attached it to the ex08.inp and ran it.
I am getting a different error now:
[nline images 1]|

Is this an issue with my fluka installation as you said the source.f code worked when you tested it.

Could you advice please? Thanks in advance.


Cheers,
Shri

(Srinidhi Bheesette)

On 26 May 2017 at 19:51, Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch<mailto:luigi.salvatore.esposito_at_cern.ch>> wrote:
Dear Shri,
Attached a slightly modified version of your source.f that works.
Best regards, luigi



From: Shri Bheesette <srinidhi.bheesette_at_cern.ch<mailto:srinidhi.bheesette_at_cern.ch>>
Date: Friday, 26 May 2017 at 06:45
To: Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch<mailto:luigi.salvatore.esposito_at_cern.ch>>
Cc: Joachim Vollaire <joachim.vollaire_at_cern.ch<mailto:joachim.vollaire_at_cern.ch>>, Francesco Cerutti <Francesco.Cerutti_at_cern.ch<mailto:Francesco.Cerutti_at_cern.ch>>, FLUKA discussion <fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>>
Subject: Re: [fluka-discuss]: Error when creating source.f executable

Hi Luigi

Thanks for your reply.

I have tried several ways of reading a file. I have summarised them below:

Full path assignment:

[ine images 2]
This throws up the following error:

[ine images 1]

Path variable assignment:

[ine images 2]

The error I get in this case is
[ine images 1]
Is that right place to initialize the variable fileplace?

Call routine:
[ine images 1]
This doesn't work either. Am I again getting the initialization wrong? Or if the syntax for the CALL OAUXFI routine wrong?

Could you advise me, please?

Thanks in advance. Hoping to hear from you.


Cheers,
Shri

(Srinidhi Bheesette)

On 25 May 2017 at 19:51, Luigi Salvatore Esposito <luigi.salvatore.esposito_at_cern.ch<mailto:luigi.salvatore.esposito_at_cern.ch>> wrote:
Dear Srinidhi,
Use the OAUXFI routine to open the file, otherwise with the OPEN routine you have to specify the full path.
More details in http://www.fluka.org/web_archive/earchive/prova/0909.html
Hope this could help.
Best regards, luigi



From: <owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it>> on behalf of Srinidhi Bheesette <srinidhi.bheesette_at_cern.ch<mailto:srinidhi.bheesette_at_cern.ch>>
Date: Thursday, 25 May 2017 at 01:41
To: Joachim Vollaire <joachim.vollaire_at_cern.ch<mailto:joachim.vollaire_at_cern.ch>>
Cc: Francesco Cerutti <Francesco.Cerutti_at_cern.ch<mailto:Francesco.Cerutti_at_cern.ch>>, FLUKA discussion <fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>>
Subject: Re: [fluka-discuss]: Error when creating source.f executable

Hi Joachim,

Thanks for your mail.

I tried the command you mentioned but it gave me an error. However this worked:

$FLUPRO/flutil/rfluka -e source_shri -N0 -M1 ex08.inp

The run doesn't do through and I spot this error in log file

[ne images 2]

But, I compiled the source and executable using flair and its completes without any error.

[ne images 3]

I have attached the source.f with this mail. Could you please let me know where I am going wrong.

Yes I have included the SOURCE, USRICALL and USROCALL in the *.inp file (attached).

Thanks in advance.

Cheers,
Shri

(Srinidhi Bheesette)

On 24 May 2017 at 18:25, Joachim Vollaire <joachim.vollaire_at_cern.ch<mailto:joachim.vollaire_at_cern.ch>> wrote:
Hi

Everything can be done either from flair or from the terminal.

From the terminal use –e to specify the fluka executable you created (and not the default flukahp in the $FLUPRO directory):
$FLUPRO/flutil/rfluka -N0 -M5 "myexample.inp –e yourflukaexec

Or from flair in the run tab, there is an Exe button which allow you to select your customized executable.

In the input file you must add a SOURCE card, otherwise the routine will never be called when primary particles are generated. If you don’t do it, default value or values specified in the cards used to define the source as BEAM or BEAMPOS will be used instead of the logic you have defined in the source routine.
Hoping this help
Greetings
Joachim

From: owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it> [mailto:owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it>] On Behalf Of Srinidhi Bheesette
Sent: 19 May 2017 01:13
To: Francesco Cerutti <Francesco.Cerutti_at_cern.ch<mailto:Francesco.Cerutti_at_cern.ch>>
Cc: FLUKA discussion <fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>>
Subject: Re: [fluka-discuss]: Error when creating source.f executable

Hi Francesco,

Thanks for your reply.
Yes, I realised I was copying the odd character from the FLUKA tutorial slides.

It works!

But I have few more doubts:

  1. How do I attach the executable file created by the fair run?
  2. Do I need to specify a source routine in the input file?
  3. Or can I manually run the simulation using the $FLUPRO/flutil/rfluka -N0 -M5 "myexample.inp" from the terminal?
I have attached the input file, source.f and the *.dat file with this mail.

Thanks in advance.


Cheers,
Shri

(Srinidhi Bheesette)

On 17 May 2017 at 19:13, Francesco Cerutti <Francesco.Cerutti_at_cern.ch<mailto:Francesco.Cerutti_at_cern.ch>> wrote:

Hi

the problem is with the character you used on your command line before "m"
and "o", it's not a regular hyphen but something else.

If you read the outcome, you can see:
g77: -m: No such file or directory
since your "-" is actually an odd character

Best wishes

Francesco

**************************************************
Francesco Cerutti
CERN-EN/STI
CH-1211 Geneva 23
Switzerland
tel. ++41 22 7678962
fax ++41 22 7668854

On Wed, 17 May 2017, Srinidhi Bheesette wrote:

> Hi all,
> I am trying to compile a source.f file. The object file gets generated
> without any error but then when I generate the executable file I am getting
> I get the following messages:
> Inline images 1
>
> Could you let me know where I am going wrong?
> Help would be greatly appreciated.
>
> Thank you.
>
> Cheers,
> Shri
>
> (Srinidhi Bheesette)
>
>







__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

image001.png
(image/png attachment: image001.png)

image002.png
(image/png attachment: image002.png)

image003.png
(image/png attachment: image003.png)

image004.png
(image/png attachment: image004.png)

image005.png
(image/png attachment: image005.png)

image006.png
(image/png attachment: image006.png)

image007.png
(image/png attachment: image007.png)

image008.png
(image/png attachment: image008.png)

Received on Sun May 28 2017 - 21:45:11 CEST

This archive was generated by hypermail 2.3.0 : Sun May 28 2017 - 21:45:21 CEST