GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Geant4 not working with current fairbase (10/10/12) [SOLVED]
Geant4 not working with current fairbase (10/10/12) [SOLVED] [message #14087] Wed, 10 October 2012 20:20 Go to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *physics.sunysb.edu
Has anyone had any luck using geant4 with the current fairbase (10/10/12)?? If so, can you please reply. I am unable to run fairroot with geant4 and I need to know if the problem is because of a bug or because of my personal error.

I tried running the rutherford example,
cd fairbase/examples/rutherford/macros
root run_rutherford.C
And it seemed to run without a hitch.

However, run_rutherford as it is in the repository uses Geant3. I want to use Geant4, so I replace run->SetName("TGeant3"); with run->SetName("TGeant4");

After I try to run_rutherford.C again, I get a segmentation fault. The error is described in geant4SeFault.txt.

I naively copied g4libs.C from sep12/transport/geant4_vmc into my sep12-build/share/root/macros and into my gconfig folder in my fairbase. Note: the g4libs.C was not found at all in my sep12 build folder, which might suggest that sep12 is faulty in this aspect. After copying g4libs.C into said folders, I ran rutherford again and obtained the error described in geant4now.txt. I don't know what else to try, so any help is greatly appreciated.

Thank you in advance

[Updated on: Fri, 12 October 2012 11:20] by Moderator

Report message to a moderator

Re: Geant4 not working with current fairbase (10/10/12) [message #14088 is a reply to message #14087] Thu, 11 October 2012 07:11 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Raphael,

This is not a general problem of FairRoot, but a very special one and I am working on the problem. It is related with the fact that we define in the run_rutherford.C maccro a Alpha particle which is already predefined in Geant4. If you define in the FairIonGenerator a particle with Z,A,Q = 3,6,3 instead of the Alpha the macro will work.
I hope I will fix the problem today or tomorrow.

Ciao

Florian
Re: Geant4 not working with current fairbase (10/10/12) [message #14091 is a reply to message #14088] Thu, 11 October 2012 12:12 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Raphael,

the problem with Geant4 is fixed now, so please update your local working copy and try again.

Ciao

Florian
Re: Geant4 not working with current fairbase (10/10/12) [message #14096 is a reply to message #14091] Thu, 11 October 2012 14:32 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
Hi Florian,

I tried to updated my local copy

svn update
cd build
cmake ..
make

I then went to my rutherford directory and tried to run the rutherford example.

root run_rutherford.C

but I get the same segmentation fault. I pretty much get all the same errors outlined in my original post whether or not I copy g4libs.C into the directories fairroot thinks I should have them in.

I also tried changing the parameters of FairIonGenerator to be Z,A,Q = 3,6,3 and it still gave me the same segmentation fault. I even commented out both FairBoxGenerator and FairIonGenerator.

The macro works just fine with TGeant3.

Based on what I just told you, I am very convinced that fairroot doesn't know what Geant4 is. Did it work with your fairroot? If it worked on your fairroot and not mine, maybe it suggests that my fairroot is a little broken.

I'm going to try a couple more things out later today, but it looks like geant4 is, as of now, not working at all with fairroot, or at least mine.

Thank you for your help and reply. I really appreciate it.

-Raphael
Re: Geant4 not working with current fairbase (10/10/12) [message #14097 is a reply to message #14096] Thu, 11 October 2012 14:54 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
In PandaRoot Geant4 is working nicely, nobody has reported about errors or crashes. Then maye you have somehow a screwed installation.
Re: Geant4 not working with current fairbase (10/10/12) [message #14098 is a reply to message #14097] Thu, 11 October 2012 15:00 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
Thank you Stefano.

I will try both installing PandaRoot and reinstalling FairRoot from scratch. Hopefully one of those approaches works.

As for my current setup, Geant4 also does not work with Tutorial1 and Tutorial2. I get the same error messages when as I do when I run rutherford.
Re: Geant4 not working with current fairbase (10/10/12) [message #14099 is a reply to message #14096] Thu, 11 October 2012 15:06 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Raphael,

now I see that you have a different error then I had. Could you please send me the output produced when running the run_rutherford.C macro.
Also please send me the file config.sh from your build directory.

For me it looks like some of the environment variables are not set properly.

After my changes the run_rutherford.C macro works as expected using only FairRoot.

Ciao

Florian

[Updated on: Thu, 11 October 2012 15:08]

Report message to a moderator

Re: Geant4 not working with current fairbase (10/10/12) [message #14100 is a reply to message #14099] Thu, 11 October 2012 15:25 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
Hi Florian,
I attached my segmentation fault error, my configure file to set the environment variables, and my current environment variables.

Again, thank you for your timely response!
-Raphael
Re: Geant4 not working with current fairbase (10/10/12) [message #14102 is a reply to message #14100] Thu, 11 October 2012 20:27 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *pools.arcor-ip.net
Hi Raphael,

after I have seen your fairroot_config.sh script I don't wonder why it is not working. Many of the needed variables are missing.

You don't have to create such a file on your on. CMake creates a complete setup script during its run. You find the script in your fairroot build directory. It is called config.sh.
Please source this file to setup the complete environment which is needed to run fairroot.

Ciao

Florian
Re: Geant4 not working with current fairbase (10/10/12) [message #14103 is a reply to message #14087] Thu, 11 October 2012 21:16 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *physics.sunysb.edu
Hi Florian,
Thank you for pointing out my mistake regarding the variable configuration. However, I have one last problem. Fairroot doesn't seem to have found the necessary file for GEANT4VMC_MACRO_DIR.

export GEANT4VMC_MACRO_DIR="GEANT4VMC_MACRO_DIR-NOTFOUND"

I'm going to attach my config.sh. Can someone tell me exactly what file is supposed to be there? In the meantime, I'm going to try to figure out why I have this problem.

Thank you,
Raphael
  • Attachment: config.sh
    (Size: 3.31KB, Downloaded 258 times)
Re: Geant4 not working with current fairbase (10/10/12) [message #14104 is a reply to message #14103] Thu, 11 October 2012 23:04 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *physics.sunysb.edu
I'm actually missing what is supposed to go in /sep12-build/share/geant4_vmc/macro. What is supposed to go in that directory is g4libs.C
I'm not sure how to go about it because everytime I do ./configure.sh in sep12, it thinks that everything is fine. I'm tempted in completely removing sep12-lib and rebuilding it again. Does anyone have a better idea?
Re: Geant4 not working with current fairbase (10/10/12) [message #14105 is a reply to message #14104] Fri, 12 October 2012 01:02 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
[SOLVED]
Re: Geant4 not working with current fairbase (10/10/12) [message #14108 is a reply to message #14104] Fri, 12 October 2012 11:31 Go to previous message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Raphael,

please do the following steps to reinstall only the geant4vmc package.

1. Delete libgeant4vmc.so in the lib subdir of your installation directory. In your case the file is probably in /home/raphael/Documents/sep12-build/

2. Delete the following directory in the main source directory of the external packages: "transport/geant4_vmc"

3. Do a "svn update" in the main source directory of the external packages.

4. Rerun the configure.sh script. This should reinstall geant4_vmc

5. Remove the build directory of your FairRoot installation.

6. Rebuild FairRoot

After this I hope you will have a correct config.sh script and a running version of FairRoot.

Ciao

Florian
Previous Topic: fairbase does not compiile properly as is (10-5-12) [SOLVED]
Next Topic: abxolute scaling of the geometry files[SOLVED]?
Goto Forum:
  


Current Time: Sun Dec 01 08:39:40 CET 2024

Total time taken to generate the page: 0.00700 seconds