Getting Error after completing the build and compilation of example B1

Hello Everyone,
After completing the installation setup. While testing for correct installation, I’m getting this error after completing the building and compilation of exampleB1. I’m not able to resolve this issue. Please help me with this.
Details of software :
_Geant4 Version: v11.1.0
_Operating System:_Windows 10
Compiler/Version: Visual Studio 2019

Available UI session types: [ Win32, csh ](along with a pop up window specifying an abort() action)

1 Like

Is there any other information in the terminal output or pop up window indicating the cause to the error? All I can think is that the data libraries are not present or found correctly (see the Post Install Setup section of the Install Guide), so that may be worth checking.

Thank you @bmorgan for taking the time to help me with this.
I’ve rechecked for all the data libraries and added all the required environment variables. Though I haven’t installed OpenGL yet. Is it necessary to install it? I was following a YouTube tutorial in which the examples run even without OpenGL.

The examples will run, but not the visualization. OpenGL is the “engine” that draws the pictures for you. So you can run all of the examples and get output data files, log files, etc., but not pretty pictures.

The example macros (specifically init_vis.mac) do usually assume an OpenGL visualisation driver is available, so you might be seeing a similar problem to Error 500 when compiling examples.

You can either reconfigure/rebuild Geant4 with the CMake variable GEANT4_USE_OPENGL_WIN32 set to ON, or change the line in the macro that selects the OGL driver to one of those available.

Respected Sir ,
Do you know how o integrate Cry library with Geant4?
Can you plz guide me I am facing this error?

@ashish01535, please do not post unrelated questions in a thread. You have already asked this question in a separate post, and also in other Cry related threads.

I’m not getting any such error. Can you please help me with the setting up OpenGL for use in Geant4 in Windows 10?

Did you see the reply above, before the interruption?

There should be guidance in the Installation Guide.

I reconfigured the setup by CMake variable GEANT4_USE_OPENGL_WIN32= ON and tried to run the example again but still getting the same error.

did you run
cmake --build . --config Release

and recompile the example after reconfiguring?

Yes I did. But I’m still getting the same error. Should I reinstall everything from the start?

Just to be clear, there are two reconfigure+recompile operations required here:

  1. Reconfigure, recompile and reinstall the Geant4 libraries with cmake -DGEANT4_USE_OPENGL_WIN32=ON ., then cmake --build . --config Release and reinstall.
  2. Reconfigure and recompile the exampleB1 application against the reconfigured and reinstalled Geant4 libraries from step 1.

If you’ve done both of those and are still not seeing “OpenGL” listed in

Available UI session types: [ Win32, csh ]

then something else is going on and then I’d definitely recommend starting completely from scratch. Otherwise, please post the complete output from the output of exampleB1, and what the “abort()” action is reporting.

I’m getting this pop up after recompiling:

I’ve one more question is it necessary to have Open Inventor Visualization installed?

Thanks for the pop-up capture! Could you also post what’s printed to the terminal when you try running the application please?

There’s no requirement to have any optional visualisation driver installed. The examples generally assume that at least one OpenGL based driver is installed but it’s up to the user which one. I would generally recommend the minimal Win32 GL as has been mentioned here to get started as this can be built with nothing more than standard Visual Studio which is required anyway.

I get only this line printed after the compilation:
‘Available UI session types: [ Win32, csh ]’

Could you confirm if you have recompiled and reinstalled Geant4 itself, and then recompiled the application against this please, as described here:

Yes, I did the same.

O.k, something odd is going on, so could you check the following please:

  1. In the directory where you built the toolkit, check that

    • The CMakeCache.txt file in the build has GEANT4_USE_OPENGL_WIN32 set to ON
  2. Under the directory in which you installed the toolkit, find the Geant4Config.cmake file under where the toolkit was installed, and check this has the lines

    # - OpenGL Win32
    set(Geant4_vis_opengl_win32_FOUND ON)

If neither of those are the case, then the toolkit hasn’t been built/installed with OpenGL support. Then check:

  1. In the directory where you built the application, run

    > cmake --build . --config Release --target clean
    > cmake --verbose --build . --config Release 

    The commands printed should have a flag like -DG4VIS_USE_OPENGLWIN32 or similar present. If they don’t, then the application isn’t picking up the correct configuration from the toolkit installation.

Let’s get answers to the above first before trying anything else.

1 Like