Hi,
I’m trying to create a parallel world nesting doll set of ‘concentric’ boxes where the importance weight increases as particles move to the outer boxes. I am using multi-threading, and have initialized the problem following Section 3.7 of the Book for Application Developers:
G4String paraWorldName = "ParallelWorld";
B4dParallelDetectorConstruction *pdet = new
B4dParallelDetectorConstruction(paraWorldName);
detConstruction->RegisterParallelWorld(pdet);
G4GeometrySampler pgs(&(pdet->GetWorldVolumeAddress()),"gamma");
pgs.SetParallel(true);
G4PhysListFactory factory;
G4VModularPhysicsList *physicsList = factory.GetReferencePhysList("QGSP_BERT_HP");
physicsList->RegisterPhysics(new G4ImportanceBiasing(&pgs,paraWorldName));
physicsList->RegisterPhysics(new G4ParallelWorldPhysics(paraWorldName));
runManager->SetUserInitialization(physicsList);
I see the following message in my output:
G4IStore:: Creating new Parallel IStore ParallelWorld
G4IStore:: ParallelWorldName = ParallelWorld
G4IStore:: fParallelWorldVolume = ParallelWorld
G4GeometrySampler:: preparing importance sampling WorldName is
G4ImportanceConfigurator:: setting world name:
make sure AddProcess() is invoked for biasing!!!
G4ImportanceConfigurator:: entering importance configure, paraflag 1
### G4ImportanceProcess:: Creating
G4ImportanceProcess:: importance process paraflag is: 1
How can I be sure that the importance weights are actually causing splitting at the parallel world boundaries? Where do I need to invoke AddProcess()
as the output instructs?
When I run this, I eventually get an error, that seems to indicate there is an issue with the multiprocessing:
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Run0117
issued by : G4WorkerRunManagerKernel::SetupShadowProcess()
Size of G4ProcessVector is inconsistent between master and worker threads for the particle <gamma>.
size of G4ProcessVector for worker thread is 8 while master thread is 9.
*** Fatal Exception *** core dump ***
G4WT0 > **** Track information is not available at this moment
G4WT0 > **** Step information is not available at this moment
G4WT0 >
-------- EEEE -------- G4Exception-END --------- EEEE -------
I found scant information about this error online, but I did find an internal kernel update report which states “Check your physics list. Most-likely your ConstructPhysics() method or its granular method has a data member Boolean flag or something similar to protect not to execute this method more than once.” I’d appreciate it if someone could suggest what I can do to fix this.