Error in example /extended/eventgenerator/exgps/

Hi all,

I am running an example /extended/eventgenerator/exgps/ with geant4 version 11.0.0. The code compiles and builds the target successfully. But when I hit ./exgps vis.mac in the Linux terminal, it throws me the following error,

/vis/open OGL 600x600-0+0
***** COMMAND NOT FOUND </vis/open OGL 600x600-0+0> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

I haven’t changed anything on the example code. Can you please point me out how to remove these errors?

Geant4 version: 11.0.0
gcc version: 9.3.0
Red Hat Enterprise Linux Server release 7.9

1 Like

Hi. You do not need to type ./exgps vis.mac. Just type ./exgps

That will put you into interactive mode with the graphics initialized. (Calling exgps without a macro will automatically run vis.mac. You do not want to run vis.mac in batch mode.)

You need to build Geant4 with OpenGL. Look at Building and Installing from Source — Geant4 Installation Guide 11.0 documentation. You need GEANT4_USE_OPENGL_X11 and/or GEANT4_USE_QT (if you have Qt).

1 Like

Thank you so much for the reply. When exgps is called by typing ./exgps, same errors come up on the screen.

That’s interesting. When I type ./exgps, the program works properly. If I type ./exgps vis.mac I get the same errors you do. I have Geant4 10.0.2 built using opengl and qt.

So maybe there are two problems. Do you have Geant4 built as per John Allison’s post above?