G4VisManager::GetVerbosityValue: invalid verbosity “” by running exampleB1

I would like to run the exampleB1 from the command prompt in Visual Studio 2026, but I get the following:

C:\Users\Green_2124C\Geant4\geant4-v11.4.2\geant4-v11.4.2\examples\basic\B1\out\build\x64-Debug>.\exampleB1 run2.mac


Geant4 version Name: geant4-11-04-patch-02 [MT] (12-June-2026)
<< in Multi-threaded mode >>
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/


<<< Reference Physics List QBBC

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetName
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetId
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Accumulable registered as “”

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetName
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetId
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Accumulable registered as “”
ERROR: G4VisManager::GetVerbosityValue: invalid verbosity “”
Available verbosity options:
Simple graded message scheme - digit or string (1st character defines):
0) quiet, // Nothing is printed.

  1. startup, // Startup and endup messages are printed…
  2. errors, // …and errors…
  3. warnings, // …and warnings…
  4. confirmations, // …and confirming messages…
  5. parameters, // …and parameters of scenes and views…
  6. all // …and everything available.
    Current verbosity: warnings (3)
    Visualization Manager instantiating with verbosity “warnings (3)”…
    Visualization Manager initialising…
    Registering graphics systems…

C:\Users\Green_2124C\Geant4\geant4-v11.4.2\geant4-v11.4.2\examples\basic\B1\out\build\x64-Debug>

What did I do wrong?

Geant4 Version: 11.4.2
Operating System: Windows 10 Pro
Compiler/Version: Microsoft Visual Studio 2026, Version 18.7.3
CMake Version: The one included in Visual Studio 2026, Version 18.7.3


Hi Andrea

Mmmm. works fine for me:

<where my build puts the binary>/bin/exampleB1 run2.mac
...
<<< Reference Physics List QBBC 
Accumulable registered as "accumulable_0"
Accumulable registered as "accumulable_1"
Visualization Manager instantiating with verbosity "warnings (3)"...
Visualization Manager initialising...
Registering graphics systems...

Does it work with run1.mac? Does it work OK interactively (no argument)?

Check where your build has put the binary. Look at the time stamp. Make sure it’s the current binary. (I’m afraid I’m not familiar with the Windows build procedure.)

John

Hello John. Thank you very much for your help.

I produced I new executable with Visual Studio.

Then I ran it with run1.mac and I got this:

C:\Users\Green_2124C\Geant4\geant4-v11.4.2\geant4-v11.4.2\examples\basic\B1\out\build\x64-Debug>.\exampleB1 run1.mac


Geant4 version Name: geant4-11-04-patch-02 [MT] (12-June-2026)
<< in Multi-threaded mode >>
Copyright : Geant4 Collaboration
References : NIM A 506 (2003), 250-303
: IEEE-TNS 53 (2006), 270-278
: NIM A 835 (2016), 186-225
WWW : http://geant4.org/


<<< Reference Physics List QBBC

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetName
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetId
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Accumulable registered as “”

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetName
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetId
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Accumulable registered as “”

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetId
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Accumulable registered as “”

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetName
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4VAccumulable::SetId
Accumulable was already registered. Setting is ignored
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Accumulable registered as “”

It’s not bad, I think.

My executable is in: C:\Users\Green_2124C\Geant4\geant4-v11.4.2\geant4-v11.4.2\examples\basic\B1\out\build\x64-Debug>

If I run it with no arguments then it opens a new window where the error message is shown for a couple of seconds and then immediately closes the window without giving me time to read the message. I just could see that I got the same error messages as with run2.mac.

Just to confirm, is this exampleB1 code as supplied with zero modifications?

bmorgan,

I confirm that this is the exampleB1 with zero modifications.

But I am afraid that probably I did not correctly install Geant4.

I am seriously considering to reinstall it from scratch.