RE: magfld. error

From: Alessio Mereghetti <Alessio.Mereghetti_at_cern.ch>
Date: Fri, 1 Mar 2013 17:38:52 +0000

2013 18:38:58 +0100 (CET)
X-Virus-Scanned: clamav-milter 0.97.6 at smtp2.mi.infn.it
X-Virus-Status: Clean
Sender: owner-fluka-discuss_at_mi.infn.it

Hi Leila,

You get that error simply because the following statement:
       IF (NREG.EQ.NQUADRA) THEN
in your routine is not closed by a corresponding:
       END IF
Keep in mind that Flair has an output window, very useful especially when you have compilation problems (but not only :)). In your case, you receive the following messages:

  Compiling: /usr/local/fluka/flutil/fff -b -N magfld_mod.f
   magfld:
magfld_mod.f: In subroutine `magfld':
magfld_mod.f:53:
          IF (NREG.EQ.NQUADRA) THEN
          1
magfld_mod.f:75: (continued):
          END
          2
Statement at (2) invalid in context established by statement at (1)
magfld_mod.f:53:
          IF (NREG.EQ.NQUADRA) THEN
          ^
End of source file before end of block started at (^)

pointing to the fact that there are some non-closed statements (even though the compiler doesn't explicitly say which block is not close and where to properly insert the missing closing statement):

Moreover, pay attention to the fact that you save the number of both 'QuadrA' and 'QuadrAA' regions in the variable NQUADRA, i.e. you save the region number of the first quad but then you overwrite it with the region number of the second quad.

In addition, the condition:
          IF (NQUADRA.EQ.QuadrA) THEN
is never satisfied, since QuadrA is never initialised.

If you want both quads to be 'turned on' in your simulations, I guess you should also re-work a bit the part:
       IF (NREG.EQ.NQUADRA) THEN
[...]
       END IF
because, even if you fix the aforementioned slips, at the end FLUKA knows what to do only in case of one magnet.

Hope this helps
Alessio

*********************************
Alessio Mereghetti
CERN, EN-STI-EET
Tel: +41 (0) 22 76 79564
Office: 864 2-D13
*********************************

________________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of Leila Mokhtari [leilamokhtari2011_at_gmail.com]
Sent: 01 March 2013 13:17
To: fluka-discuss_at_fluka.org
Subject: magfld. error

Dear users,
Attached files are input and magfld.f user routine.
I need to introduce two quadruple with different gradient magnetic
field using magfld.f.
But when I want to compile magfld.f in the input, I receive this
massage: error in compiling file.
I do not know which part of my user routine has problem.
I would be grateful if somebody can help me on this.

Thanks
Leila
Received on Sat Mar 02 2013 - 16:26:40 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 02 2013 - 16:26:44 CET