Message: Crashing with G4Replica and multithreading Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Crashing with G4Replica and multithreading 

Forum: Multithreading
Date: 20 Dec, 2013
From: David Krapohl <David Krapohl>

Hello

I have problem running the code shown below multithreaded. The application is derived from example B4c. When I switch to a single thread (-t 0 ) it runs and also when I replace the code with a single pixelSolid volume with using the G4Replica. Thanks in advance for any hints. David

Here is the crash information:

Program received signal SIGABRT, Aborted. [Switching to Thread 0x7fffe3fff700 (LWP 5643)] 0x00007fffed808319 in raise () from /usr/lib/libc.so.6 (gdb) bt

#0  0x00007fffed808319 in raise () from /usr/lib/libc.so.6
#1  0x00007fffed809718 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff1ad6525 in G4Exception(char const*, char const*, G4ExceptionSeverity, char const*) () from /opt/geant4/geant4.10.00-install/lib64/libG4global.so
#3  0x00007ffff254a2e4 in G4Navigator::ComputeStep(CLHEP::Hep3Vector const&, CLHEP::Hep3Vector const&, double, double&) () from /opt/geant4/geant4.10.00-install/lib64/libG4geometry.so
#4  0x00007ffff3cf8e04 in G4Transportation::AlongStepGetPhysicalInteractionLength(G4Track const&, double, double, double&, G4GPILSelection*) () from /opt/geant4/geant4.10.00-install/lib64/libG4processes.so
#5  0x00007ffff4778856 in G4SteppingManager::DefinePhysicalStepLength() () from /opt/geant4/geant4.10.00-install/lib64/libG4tracking.so
#6  0x00007ffff4776a00 in G4SteppingManager::Stepping() () from /opt/geant4/geant4.10.00-install/lib64/libG4tracking.so
#7  0x00007ffff478103d in G4TrackingManager::ProcessOneTrack(G4Track*) () from /opt/geant4/geant4.10.00-install/lib64/libG4tracking.so
#8  0x00007ffff49b1e1d in G4EventManager::DoProcessing(G4Event*) () from /opt/geant4/geant4.10.00-install/lib64/libG4event.so
#9  0x00007ffff4c3714c in G4WorkerRunManager::ProcessOneEvent(int) () from /opt/geant4/geant4.10.00-install/lib64/libG4run.so
#10 0x00007ffff4c372c2 in G4WorkerRunManager::DoEventLoop(int, char const*, int) () from /opt/geant4/geant4.10.00-install/lib64/libG4run.so
#11 0x00007ffff4c2bd74 in G4RunManager::BeamOn(int, char const*, int) () from /opt/geant4/geant4.10.00-install/lib64/libG4run.so
#12 0x00007ffff4c40393 in G4MTRunManagerKernel::StartThread(void*) () from /opt/geant4/geant4.10.00-install/lib64/libG4run.so
#13 0x00007fffedb850a2 in start_thread () from /usr/lib/libpthread.so.0
#14 0x00007fffed8b83dd in clone () from /usr/lib/libc.so.6

The code:

  //pixel
    G4Box *pixelSolid = new G4Box("pixel_cell",
                                  pixelSize / 2.,
                                  pixelSize / 2.,
                                  sensorThickness / 2);

    G4LogicalVolume *pixelLogicalVolume = new G4LogicalVolume(pixelSolid,
                                                              sensorMaterial,
                                                              "pixel_cell");
    // row
    G4Box *rowSolid = new G4Box("row",
                                (pixelSize * nPixel) / 2.,
                                pixelSize / 2.,
                                sensorThickness / 2.);

    G4LogicalVolume *rowLogicalVolume = new G4LogicalVolume(rowSolid,
            defaultMaterial,
            "row");

    new G4PVReplica("pixel_cell",
                    pixelLogicalVolume,
                    rowLogicalVolume,
                    kXAxis,
                    nPixel,
                    pixelSize);

    //sensor layer
    G4Box *sensorSolid = new G4Box("Sensor",
                                   (pixelSize * nPixel) / 2.,
                                   (pixelSize * nPixel) / 2.,
                                   sensorThickness / 2.);

    G4LogicalVolume *sensorLogicalVolume = new G4LogicalVolume(sensorSolid,
            defaultMaterial,
            "Sensor");

    new G4PVReplica("row",
                    rowLogicalVolume,
                    sensorLogicalVolume,
                    kYAxis,
                    nPixel,
                    pixelSize);

    new G4PVPlacement(0,           //no rotation
                      G4ThreeVector(0,0,0),   //at (0,0,0)
                      sensorLogicalVolume,      //its logical volume
                      "sensor",      //its name
                      worldLV,       //its mother  volume
                      false,         //no boolean operation
                      0);            //copy number

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Crashing with G4Replica and multithreading   (Makoto Asai - 20 Dec, 2013)
(_ None: Re: Crashing with G4Replica and multithreading   (David Krapohl - 07 Jan, 2014)
(_ Question: Re: Crashing with G4Replica and multithreading   (Andrea Dotti - 13 Jan, 2014)
(_ None: Re: Crashing with G4Replica and multithreading   (David Krapohl - 13 Jan, 2014)
(_ Question: Re: Crashing with G4Replica and multithreading   (Andrea Dotti - 14 Jan, 2014)
(_ None: Re: Crashing with G4Replica and multithreading   (David Krapohl - 15 Jan, 2014)
 Add Message Add Message
to: "Crashing with G4Replica and multithreading"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews