[Gate-users] help benchPET segmentation fault

Dávid Völgyes david.volgyes at gmail.com
Wed Oct 1 14:10:24 CEST 2014


Hi,

Geant4 10.0 is not tested with Gate7, and I honestly think it will not
really work, but I never tried.
I would use the standard configuration which is described on the
Opengatecollaboration's website.

Otherwise I cannot really help, because
- I have no idea what OS do you use. I use Ubuntu 14.04, but e.g. Red
Hat can be quite different.
- I don't use neither CUDA for GATE, and I never did.
- I don't think I could add anything to the official description.
- I have limited time

Anyway, I made a Docker script which compiles GATE7 in a docker container.
It's a special environment, but if you use Ubuntu, then following
these commands are more or less straightforward.
https://github.com/dvolgyes/dockerfiles/tree/master/GATE

(Dockerfile is a special file, every line starts with a command, like
ADD, RUN, etc. Run just executes the rest of the line, but ADD is a
combination of downloading and uncompressing, you can emulate it with
wget and gunzip. Here is a reference:
https://docs.docker.com/reference/builder/ )

But I still don't understand why do you need this feature. If you
really need a verbose debug information, then you have to patch the
code and compile it again. I seriously doubt that you really need
this. Otherwise, just disable it from the GATE macro file, and use
your last version, it will not crash again.

David


On Wed, Oct 1, 2014 at 12:33 PM, André Miguel Monteiro
<andremiguelmonteiro90 at gmail.com> wrote:
> the root version is root_v5.34.21
>
> 2014-10-01 11:32 GMT+01:00 André Miguel Monteiro
> <andremiguelmonteiro90 at gmail.com>:
>>
>> Hi David,
>>
>> I have compiled from scratch clhep 2.1.3.1 then geant4.10.00.p02 and then
>> Gate and before that I installed xerces as well.
>>
>> And yes I compiled Gate7.0 from scratch from the source codes for all
>> programs.
>>
>> But now I have erased my installations.
>>
>> I am also using Cuda as well.
>>
>> Can you give me some guidance on how to proceed?
>>
>> I am following this:
>>
>>
>> https://www.triumf.info/wiki/tigwiki/index.php/Guides_for_Installing_Software
>>
>> and this:
>>
>>
>> http://wiki.opengatecollaboration.org/index.php/New_Compilation_ProcedureV7.0
>>
>> Thank you,
>>
>> Andre
>>
>>
>>
>>
>>
>> 2014-10-01 11:22 GMT+01:00 Dávid Völgyes <david.volgyes at gmail.com>:
>>>
>>> Hi,
>>>
>>> It is not that simple.
>>> First of all, Geant4 9.6.3 is not tested and probably will not compile
>>> with CLHEP 2.2.0, and all the previous versions have the bug.
>>> So, you have to modify the CLHEP code, otherwise it will not work.
>>> Geant4 which is a prerequisite for GATE7 has its own CLHEP. You can
>>> patch this, or you can patch the latest stable CLHEP (2.1.4.2). In
>>> both cases you have to recompile CLHEP, than Geant4, then GATE in that
>>> order, and with proper compiler switches. (E.g. if you compile and
>>> install external CLHEP, then Geant4 must be compiled with this one.
>>> (But the default Geant4 setting implies the internal CLHEP.))
>>> Long story short:
>>>  Did you compile your GATE7 from scratch? (from source codes,
>>> including ROOT,Geant,CLHEP, GATE)?
>>>
>>> -If yes, then patch the 224th line in the Mersenne Twister engine, and
>>> recompile it
>>> -If not, then it will take a few days to learn and compile everything,
>>> so don't do this. Just disable this debug option with the GATE command
>>> I wrote ( /gate/random/verbose 0 ), and everything will be fine. This
>>> verbose output is completely unnecessary except if you are a
>>> CLHEP/Geant/GATE developer.
>>>
>>> Best,
>>>    David
>>>
>>> On Wed, Oct 1, 2014 at 11:49 AM, André Miguel Monteiro
>>> <andremiguelmonteiro90 at gmail.com> wrote:
>>> > Hi David,
>>> >
>>> > I have installed clhep 2.1.3.1 from source.
>>> >
>>> > From what I could understand if I install a more recent version the
>>> > error
>>> > disappears?
>>> >
>>> > Do I need to install clhep and everything else or just clhep?
>>> >
>>> > Thank you.
>>> >
>>> > Best regards,
>>> >
>>> > André
>>> >
>>> > 2014-10-01 9:17 GMT+01:00 Dávid Völgyes <david.volgyes at gmail.com>:
>>> >>
>>> >> Hi,
>>> >>
>>> >> This question appears in every few weeks.
>>> >> The CLHEP in the current GATE version has a bug, it tries to read 625
>>> >> values from a 624 long array,
>>> >> and sometimes this does not work.
>>> >> It should be patched in the source code, e.g. disable this whole
>>> >> printing, because it's just a debug feature, or properly terminate the
>>> >> loop after 624 elements. (it prints the current state of the random
>>> >> number generator.)
>>> >>
>>> >> You can patch the Geant source code, if you compile it for yourself:
>>> >> sed -i "214i if(0) "
>>> >> PATH_TO_GEANT/source/externals/clhep/src/MTwistEngine.cc
>>> >> (This inserts a "if (0)" in front of the printing loop (line 214),
>>> >> which basically disables the loop.)
>>> >>
>>> >> Or you can disable the verbose mode of the random number generator, or
>>> >> you can choose another random number generator, anything else is just
>>> >> as good as the Mersenne Twister.
>>> >> Disabling the verbose mode:
>>> >> Comment this line out in your macros (put a # to the beginning of the
>>> >> line):
>>> >> /gate/random/verbose 1
>>> >> Or change it to:
>>> >> /gate/random/verbose 0
>>> >>
>>> >> Below you can read Gergely Patay's explanation which was sent around a
>>> >> month ago.
>>> >>
>>> >> David
>>> >>
>>> >> On Thu, Sep 4, 2014 at 10:33 AM, Patay Gergely
>>> >> <patay.gergely at mediso.hu>
>>> >> wrote:
>>> >> > Hello,
>>> >> >
>>> >> > this is caused by a bug in CLHEP. It was corrected since 2.2.0.0,
>>> >> > but
>>> >> > unfortunately Geant4.9.6 includes the 2.1.3.1 version.
>>> >> >
>>> >> >
>>> >> > http://git.cern.ch/pubweb/CLHEP.git/blob/refs/heads/CLHEP_2_200_branch:/ChangeLog#l56
>>> >> >
>>> >> > Since this is a quite harmless bug otherwise and it occurs only at
>>> >> > the
>>> >> > call
>>> >> > to the
>>> >> > MTwistEngine::showStatus() function, a trivial workaround is to
>>> >> > comment
>>> >> > out
>>> >> > the
>>> >> > " /gate/random/verbose 1" command when you use the MersenneTwister
>>> >> > generator.
>>> >> >
>>> >> > The choice of the RNG is more or less a matter of taste (all these
>>> >> > algorithms are
>>> >> > state-of-the-art quality). The different generators *should* produce
>>> >> > the
>>> >> > same
>>> >> > results in a statistical sense, but of course, on an event-by-event
>>> >> > basis
>>> >> > they
>>> >> > will differ.
>>> >> >
>>> >> >
>>> >> > http://proj-clhep.web.cern.ch/proj-clhep/manual/UserGuide/Random/Random.html
>>> >> >
>>> >> > good luck
>>> >> >  Gergely
>>> >>
>>> >>
>>> >> On Wed, Oct 1, 2014 at 1:48 AM, André Miguel Monteiro
>>> >> <andremiguelmonteiro90 at gmail.com> wrote:
>>> >> > Hi, Gate users
>>> >> > I installed all the required packages for Gate in order to start to
>>> >> > work
>>> >> > for
>>> >> > my master thesis.
>>> >> > Now when I do what is required in here :
>>> >> >
>>> >> > http://wiki.opengatecollaboration.org/index.php/Validating_Installation
>>> >> > I get this:
>>> >> >
>>> >> > ===========================================================
>>> >> > There was a crash.
>>> >> > This is the entire stack trace of all threads:
>>> >> > ===========================================================
>>> >> > #0  0x00007f1cd66255cc in __libc_waitpid (pid=3351,
>>> >> > stat_loc=stat_loc
>>> >> > entry=0x7fffbaae9f00, options=options
>>> >> > entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:31
>>> >> > #1  0x00007f1cd65aa1d2 in do_system (line=<optimized out>) at
>>> >> > ../sysdeps/posix/system.c:148
>>> >> > #2  0x00007f1cd94430d3 in TUnixSystem::StackTrace() () from
>>> >> > /home/andre/programs/root_v5.34.21/lib/libCore.so
>>> >> > #3  0x00007f1cd9444ddc in TUnixSystem::DispatchSignals(ESignals) ()
>>> >> > from
>>> >> > /home/andre/programs/root_v5.34.21/lib/libCore.so
>>> >> > #4  <signal handler called>
>>> >> > #5  CLHEP::MTwistEngine::showStatus (this=<optimized out>) at
>>> >> > /home/andre/programs/2.1.3.1/CLHEP/Random/src/MTwistEngine.cc:217
>>> >> > #6  0x0000000000854609 in GateApplicationMgr::StartDAQ() ()
>>> >> > #7  0x0000000000801200 in
>>> >> > GateApplicationMgrMessenger::SetNewValue(G4UIcommand*, G4String) ()
>>> >> > #8  0x00007f1cd9de9a85 in G4UIcommand::DoIt(G4String) () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #9  0x00007f1cd9e010e8 in G4UImanager::ApplyCommand(char const*) ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #10 0x00007f1cd9dd8c87 in G4UIbatch::ExecCommand(G4String const&) ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #11 0x00007f1cd9dda35b in G4UIbatch::SessionStart() () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #12 0x00007f1cd9dfc843 in G4UImanager::ExecuteMacroFile(char const*)
>>> >> > ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #13 0x00007f1cd9df3db2 in
>>> >> > G4UIcontrolMessenger::SetNewValue(G4UIcommand*,
>>> >> > G4String) () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #14 0x00007f1cd9de9a85 in G4UIcommand::DoIt(G4String) () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #15 0x00007f1cd9e010e8 in G4UImanager::ApplyCommand(char const*) ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #16 0x00007f1cdd21903a in G4UIterminal::ExecuteCommand(G4String
>>> >> > const&)
>>> >> > ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4interfaces.so
>>> >> > #17 0x00007f1cdd21a5e4 in G4UIterminal::SessionStart() () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4interfaces.so
>>> >> > #18 0x00000000004eaf64 in main ()
>>> >> > ===========================================================
>>> >> >
>>> >> >
>>> >> > The lines below might hint at the cause of the crash.
>>> >> > If they do not help you then please submit a bug report at
>>> >> > http://root.cern.ch/bugs. Please post the ENTIRE stack trace
>>> >> > from above as an attachment in addition to anything else
>>> >> > that might help us fixing this issue.
>>> >> > ===========================================================
>>> >> > #5  CLHEP::MTwistEngine::showStatus (this=<optimized out>) at
>>> >> > /home/andre/programs/2.1.3.1/CLHEP/Random/src/MTwistEngine.cc:217
>>> >> > #6  0x0000000000854609 in GateApplicationMgr::StartDAQ() ()
>>> >> > #7  0x0000000000801200 in
>>> >> > GateApplicationMgrMessenger::SetNewValue(G4UIcommand*, G4String) ()
>>> >> > #8  0x00007f1cd9de9a85 in G4UIcommand::DoIt(G4String) () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #9  0x00007f1cd9e010e8 in G4UImanager::ApplyCommand(char const*) ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #10 0x00007f1cd9dd8c87 in G4UIbatch::ExecCommand(G4String const&) ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #11 0x00007f1cd9dda35b in G4UIbatch::SessionStart() () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #12 0x00007f1cd9dfc843 in G4UImanager::ExecuteMacroFile(char const*)
>>> >> > ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #13 0x00007f1cd9df3db2 in
>>> >> > G4UIcontrolMessenger::SetNewValue(G4UIcommand*,
>>> >> > G4String) () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #14 0x00007f1cd9de9a85 in G4UIcommand::DoIt(G4String) () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #15 0x00007f1cd9e010e8 in G4UImanager::ApplyCommand(char const*) ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4intercoms.so
>>> >> > #16 0x00007f1cdd21903a in G4UIterminal::ExecuteCommand(G4String
>>> >> > const&)
>>> >> > ()
>>> >> > from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4interfaces.so
>>> >> > #17 0x00007f1cdd21a5e4 in G4UIterminal::SessionStart() () from
>>> >> > /home/andre/programs/geant4.10.00.p02-install/lib/libG4interfaces.so
>>> >> > #18 0x00000000004eaf64 in main ()
>>> >> > ===========================================================
>>> >> >
>>> >> >
>>> >> > Segmentation fault (core dumped)
>>> >> >
>>> >> > Does anyone give a clue on how to solve the segmentation fault
>>> >> > problem?
>>> >> >
>>> >> > best regards,
>>> >> > Andre
>>> >> >
>>> >> > _______________________________________________
>>> >> > Gate-users mailing list
>>> >> > Gate-users at lists.opengatecollaboration.org
>>> >> > http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>>> >
>>> >
>>
>>
>


More information about the Gate-users mailing list