GithubHelp home page GithubHelp logo

old-gam-g4's Introduction

GitHub tag (latest by date) Read the Docs CI cirrus CI pre-commit.ci status

This is GATE10 beta version. The first non-beta release will be officially announced end of May 2024.

See the User Guide. The current version uses Geant4 11.2.1.

How to install (short version)

Compatible with Python 3.8, 3.9, 3.10, 3.11. Not available for Python 3.12 yet. On Windows multithreading, Qt visualization and the "spawn new subprocess" are not (yet) available.

First, create an environment (not mandatory but highly advised)

python -m venv opengate_env
source opengate_env/bin/activate

or you can use the conda environment.

conda create --name opengate_env python=3.9
conda activate opengate_env

Then install the package opengate. The package opengate_core is automatically downloaded. opengate_core installs Geant4 librairies.

pip install --upgrade pip
pip install --pre opengate

If you already installed the packages and want to upgrade to the latest version:

pip install --upgrade --pre opengate

Once installed, you can run all tests:

opengate_tests

WARNING The first time you run this command, the test data will be downloaded. If the download fails (on some systems), try to add the following command before running opengate_tests:

export GIT_SSL_NO_VERIFY=1

All tests are in the folder here. The test data (binary files) are stored, for technical reasons, in this git: https://gitlab.in2p3.fr/opengamgate/gam_tests_data (which is stored as a git submodule).

WARNING Some tests (e.g. test034) needs gaga-phsp which needs pytorch that cannot really be automatically installed by the previous pip install (at least we don't know how to do). So, in order to run those tests, you will have to install both PyTorch and gaga-phsp first with

pip install torch
pip install gaga-phsp

The documentation is here: https://opengate-python.readthedocs.io/en/latest/user_guide.html

How to install (long version, for developers)

See the documentation: https://opengate-python.readthedocs.io/en/latest/developer_guide.html#installation-for-developers

old-gam-g4's People

Contributors

dsarrut avatar tbaudier avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

trellixvulnteam

old-gam-g4's Issues

SegFault with python 3.9

With python 3.9 and Linux and Mac, there is segmentation fault for the tests (eg: test004_simple.py):

Verbose        : 10
Running verbose: 20
Geant4 verbose : False, level = 1
Visualisation  : False, verbose level = 1
Check overlap  : True
Multithreading : no (not available, G4 was not compiled with MT)
Random engine  : MersenneTwister, seed = auto 
Simulation: create G4RunManager


          ################################
          !!! G4Backtrace is activated !!!
          ################################

Simulation: initialize Geometry
Simulation: initialize Physics
Simulation: initialize Source
Simulation: initialize Actions
Actor: initialize [SimulationStatisticsActor] Stats
Simulation: initialize G4RunManager
Actor: "Stats" (attached to "world") set to volume "world"
Actor: "Stats" (attached to "world") set to volume "Waterbox"
Simulation: initialize Actors
Actor: initialize [SimulationStatisticsActor] Stats
Simulation: check volumes overlap
DEBUG Register sensitive detector in no MT mode
Actor: "Stats" (attached to "world") set to volume "world"
Actor: "Stats" (attached to "world") set to volume "Waterbox"
--------------------------------------------------------------------------------
Simulation: START


### CAUGHT SIGNAL: 11 ### address: 0x10,  signal =  SIGSEGV, value =   11, description = segmentation violation. Address not mapped to object.

Backtrace:
[PID=30250, TID=-2][ 0/31]> python(PyLong_FromSsize_t+0x24) [0x55f3463c5684]
[PID=30250, TID=-2][ 1/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/gam-g4/gam_g4/gam_g4.cpython-39-x86_64-linux-gnu.so(+0x90946) [0x7fe808f80946]
[PID=30250, TID=-2][ 2/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/gam-g4/gam_g4/gam_g4.cpython-39-x86_64-linux-gnu.so(+0x8c150) [0x7fe808f7c150]
[PID=30250, TID=-2][ 3/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/geant4/bin/BuildProducts/lib64/libG4run.so(_ZN12G4RunManager14RunTerminationEv+0x42) [0x7fe8044e8c92]
[PID=30250, TID=-2][ 4/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/geant4/bin/BuildProducts/lib64/libG4run.so(_ZN12G4RunManager6BeamOnEiPKci+0xea) [0x7fe8044e75aa]
[PID=30250, TID=-2][ 5/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/geant4/bin/BuildProducts/lib64/libG4run.so(_ZN14G4RunMessenger11SetNewValueEP11G4UIcommand8G4String+0x541) [0x7fe804523e21]
[PID=30250, TID=-2][ 6/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/geant4/bin/BuildProducts/lib64/libG4intercoms.so(_ZN11G4UIcommand4DoItE8G4String+0x420) [0x7fe80bde1ea0]
[PID=30250, TID=-2][ 7/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/geant4/bin/BuildProducts/lib64/libG4intercoms.so(_ZN11G4UImanager12ApplyCommandEPKc+0x70f) [0x7fe80bdfb5bf]
[PID=30250, TID=-2][ 8/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/gam-g4/gam_g4/gam_g4.cpython-39-x86_64-linux-gnu.so(+0xa1370) [0x7fe808f91370]
[PID=30250, TID=-2][ 9/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/gam-g4/gam_g4/gam_g4.cpython-39-x86_64-linux-gnu.so(+0x102f28) [0x7fe808ff2f28]
[PID=30250, TID=-2][10/31]> /home/asaporta/Software/GatePython/gam-g4_geant11/gam-g4/gam_g4/gam_g4.cpython-39-x86_64-linux-gnu.so(+0x88033) [0x7fe808f78033]
[PID=30250, TID=-2][11/31]> python(+0x1887e6) [0x55f3463f27e6]
[PID=30250, TID=-2][12/31]> python(_PyObject_MakeTpCall+0x37f) [0x55f3463b3b3f]
[PID=30250, TID=-2][13/31]> python(+0xd0485) [0x55f34633a485]
[PID=30250, TID=-2][14/31]> python(_PyEval_EvalFrameDefault+0x4910) [0x55f34643df30]
[PID=30250, TID=-2][15/31]> python(_PyFunction_Vectorcall+0x383) [0x55f346410553]
[PID=30250, TID=-2][16/31]> python(_PyEval_EvalFrameDefault+0x868) [0x55f346439e88]
[PID=30250, TID=-2][17/31]> python(_PyFunction_Vectorcall+0x383) [0x55f346410553]
[PID=30250, TID=-2][18/31]> python(_PyEval_EvalFrameDefault+0x868) [0x55f346439e88]
[PID=30250, TID=-2][19/31]> python(+0x1a579a) [0x55f34640f79a]
[PID=30250, TID=-2][20/31]> python(_PyEval_EvalCodeWithName+0x4b) [0x55f34641014b]
[PID=30250, TID=-2][21/31]> python(PyEval_EvalCodeEx+0x44) [0x55f346410194]
[PID=30250, TID=-2][22/31]> python(PyEval_EvalCode+0x1c) [0x55f3464101bc]
[PID=30250, TID=-2][23/31]> python(+0x2525cd) [0x55f3464bc5cd]
[PID=30250, TID=-2][24/31]> python(+0x276196) [0x55f3464e0196]
[PID=30250, TID=-2][25/31]> python(+0x120091) [0x55f34638a091]
[PID=30250, TID=-2][26/31]> python(PyRun_SimpleFileExFlags+0x1c1) [0x55f3464e6ee1]
[PID=30250, TID=-2][27/31]> python(Py_RunMain+0x398) [0x55f3464e75b8]
[PID=30250, TID=-2][28/31]> python(Py_BytesMain+0x39) [0x55f3464e7729]
[PID=30250, TID=-2][29/31]> /lib64/libc.so.6(__libc_start_main+0xed) [0x7fe80cebd34d]
[PID=30250, TID=-2][30/31]> python(+0x203667) [0x55f34646d667]

: Segmentation fault (Address not mapped to object [0x10])
Aborted (core dumped)

I can trace the error to https://github.com/OpenGATE/gam-g4/blob/master/gam_g4/gam_lib/GamSourceManager.cpp#L69

The error does not occur with python < 3.9. And I update pybind, I still have the error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.