Problem 982 - Unable to compile geometry with G4DEBUG_FIELD flag set in compiler.
Summary: Unable to compile geometry with G4DEBUG_FIELD flag set in compiler.
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/magneticfield (show other problems)
Version: other
Hardware: All All
: P5 trivial
Assignee: John Apostolakis
URL:
Depends on:
Blocks:
 
Reported: 2007-10-26 19:05 CEST by Mark Tobin
Modified: 2007-11-16 09:13 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Mark Tobin 2007-10-26 19:05:36 CEST
Hello,  I am trying to generate geant events in the lhcb framework and I get an exception in G4MagIntegratorDriver which I assume is due to some overlapping volumes (see error below).  
-------------------------------------------------------------------------------
exception
-------------------------------------------------------------------------------
 Hstep is 0

*** G4Exception : Requested Integration Step is zero or negative: it must be positive
      issued by : G4MagInt_Driver::AccurateAdvance()
Requested-Step-not-Positive.
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution ***
-------------------------------------------------------------------------------

After much trial and error I decided to try to compile with the G4DEBUG_FIELD flag set so that I can try to see where in space the likely problem is.  Unfortunately this doesn't work.  The version of Geant used is 4.8.3 but I looked at the source code for 4.9.0.p01 and the same error is there.

I found the following compiler errors:

geometry/magneticfield/src/G4MagIntegratorDriver.cc
1 variable is not defined - xSubStart - and it wasn't obvious to me what the value should be.  For the time being I defined it as a G4double and gave it the value of x in my version but I don't know if that is right.
#ifdef  G4DEBUG_FIELD
  	  if(dbg>2) PrintStatus( ySubStepStart, xSubStart, y, x, h,  nstp); // Only
#endif

source/geometry/navigation/src/G4PropagatorInField.cc
there is a stray `` on line 538 of version 4.8.3 and line 545 of version 4.9.0
there is no ; on line 1240 of version 4.8.3 and line 1258 of version 4.9.0
Comment 1 Gabriele Cosmo 2007-11-16 09:13:37 CET
Compilation problem fixed in the internal tag "geomnav-V09-00-09".
Will be included in the next release or patch. Thanks.