Error code 400 / init_vis.mac cannot be opened

Hi,

I finally set up Geant4 (I hope successfully) and I’m trying to run the B1 example. When doing so, I receive the following error pop up information in Geant4:


Geant4 version Name: geant4-11-00-patch-01 [MT] (8-March-2022)
<< 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
Visualization Manager instantiating with verbosity “warnings (3)”…
Visualization Manager initialising…
Registering graphics systems…

ou have successfully registered the following graphics systems.
Registered graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateWin32 (OGLIWin32, OGLI)
OpenGLStoredWin32 (OGLSWin32, OGL, OGLS)

Registering model factories…

ou have successfully registered the following model factories.
Registered model factories:
generic
drawByAttribute
drawByCharge
drawByOriginVolume
drawByParticleID
drawByEncounteredVolume

egistered models:
None

Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
encounteredVolumeFilter

egistered filters:
None

You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none

Some /vis commands (optionally) take a string to specify colour.
/vis/list" to see available colours.
ERROR: Can not open a macro file <init_vis.mac>. Set macro path with “/control/macroPath” if needed.

------- WWWW ------- G4Exception-START -------- WWWW -------
** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
ommand aborted (400)
rror code : 400
** This is just a warning message. ***
------- WWWW -------- G4Exception-END --------- WWWW -------
/control/saveHistory
/run/verbose 2

Change the default number of threads (in multi-threaded mode)

#/run/numberOfThreads 4

Initialize kernel

/run/initialize

I can see that this above-mentioned file init_vis.mac is in the directory above the b1 execution file. But despite from that I don’t know anything about this error or its solution.

However, in Geant4 I can open a macro via the window and I guess I can run the mac-files in the upper directory, namely init_vis.mac, run1.mac, run2.mac and vis.mac. The init_vis and vis mac-files result in a new window showing visualizations of some geometry and some particles or so. I can also change viewing settings in the window options…

However, is it running as it should or do I have to care about this specific error? If so, how?
Thanks in advance!

I “solved” this via this thread: Error while running exampleB1.exe

Now I’m stuck at this:


Geant4 version Name: geant4-11-00-patch-01 [MT] (8-March-2022)
<< 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
Visualization Manager instantiating with verbosity “warnings (3)”…
Visualization Manager initialising…
Registering graphics systems…

ou have successfully registered the following graphics systems.
Registered graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateWin32 (OGLIWin32, OGLI)
OpenGLStoredWin32 (OGLSWin32, OGL, OGLS)

Registering model factories…

ou have successfully registered the following model factories.
Registered model factories:
generic
drawByAttribute
drawByCharge
drawByOriginVolume
drawByParticleID
drawByEncounteredVolume

egistered models:
None

Registered filter factories:
attributeFilter
chargeFilter
originVolumeFilter
particleFilter
encounteredVolumeFilter

egistered filters:
None

You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none

Some /vis commands (optionally) take a string to specify colour.
/vis/list" to see available colours.
/control/saveHistory
/run/verbose 2

=============================================================================
→ G4TaskRunManager::ComputeNumberOfTasks() → 0 tasks with 1 events/task…

========================================================================
→ G4TaskRunManager::CreateAndStartWorkers() → Initializing workers…

Visualization setting
/control/execute vis.mac
ERROR: Can not open a macro file <vis.mac>. Set macro path with “/control/macroPath” if needed.

------- WWWW ------- G4Exception-START -------- WWWW -------
** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
ommand aborted (400)
rror code : 400
** This is just a warning message. ***
------- WWWW -------- G4Exception-END --------- WWWW -------
***** Illegal parameter (0) </control/execute vis.mac> *****

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

------- WWWW ------- G4Exception-START -------- WWWW -------
** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
ommand aborted (400)
rror code : 400
** This is just a warning message. ***
------- WWWW -------- G4Exception-END --------- WWWW -------

Although I can still open and run e.g. init_vis.mac which opens a visualized geometry where I can navigate. But the B1 example itself does not work, I guess. However I think init_vis.mac is part of this specific example…

Ok, reading some more lines above the last error I copied the vis.mac file also into the Release folder and now it runs successfully.

Now I have to figure out how to set up and build up all these things on my own… :wink:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.