RE: magfld. error

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

2013 18:38:58 +0100 (CET)
X-Virus-Scanned: clamav-milter 0.97.6 at
X-Virus-Status: Clean

Hi Leila,

You get that error simply because the following statement:
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_mod.f: In subroutine `magfld':
magfld_mod.f:75: (continued):
Statement at (2) invalid in context established by statement at (1)
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:
       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 Mereghetti
Tel: +41 (0) 22 76 79564
Office: 864 2-D13

From: [] on behalf of Leila Mokhtari []
Sent: 01 March 2013 13:17
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.

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