Getting Error after completing the build and compilation of example B1

How should I compile in Release mode because the procedure that I follow build in Debug mode?
Should I rebuild the whole Geant4 from scratch?

I tried this for example B2a but it didn’t work

Geant4 version Name: geant4-11-01 [MT] (9-December-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)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
OpenGLImmediateWin32 (OGLIWin32, OGLI)
OpenGLStoredWin32 (OGLSWin32, OGL, OGLS)
TOOLSSG_WINDOWS_GLES (TSG_WINDOWS_GLES, TSG)

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 -------

This is the output I got on recompiling again example B1

Hello,

This says it could not find the macro file ‘init_vis.mac’.
Is the executable in the same folder as ‘init_vis.mac’?

Best regards
Max

yep! it is in the same folder

Apologies, as the example expects the macro to be in the current working directory, this should have been:

> cd ./Release
> ./exampleB1

Sorry for causing this much trouble. But it didn’t work. I’ve to manually open the file to get the visualization.

What do you mean by “manually open the file to get the visualisation”? What commands did you type, or what actions did you take, and what error messages, if any, did you see?

Thanku @bmorgan and everyone for the help.
Everything is working fine now. I would not be able to do this without your help. Thanku again for the help.

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