From 95c7a73abc8b8f8d0ebb1c05b11d65f8276a059d Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Fri, 9 Feb 2024 17:02:53 +0100 Subject: [PATCH 1/4] Use G4 v11.2.1 and towards Gate v9.4 --- .github/workflows/main.yml | 4 ++-- CMakeLists.txt | 4 ++-- docs/vgate.rst | 4 ++-- source/docker/Generate-9.4.sh | 23 +++++++++++++++++++++++ source/docker/README.md | 6 +++--- source/docker/vGate.sh | 2 +- 6 files changed, 33 insertions(+), 10 deletions(-) create mode 100755 source/docker/Generate-9.4.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bac6a8dd1..984e80cbb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: env: ROOT_VERSION: 'v6-26-08' - GEANT4_VERSION: 'v11.1.1' + GEANT4_VERSION: 'v11.2.1' ITK_VERSION: 'v5.3.0' ROOT_DIR: $(HOME)/software/root GEANT4_DIR: $(HOME)/software/geant4 @@ -321,5 +321,5 @@ jobs: mkdir gate_benchmarks export GIT_SSL_NO_VERIFY=1 git clone --recursive https://github.com/OpenGATE/GateBenchmarks.git gate_benchmarks - docker run --rm -e "TEST=${{ matrix.strategy_name }}" -v $GITHUB_WORKSPACE:/src -v $GITHUB_WORKSPACE/gate_benchmarks:/home tbaudier/gatebenchmarks:9.3 /home/.github/workflows/runTest.sh + docker run --rm -e "TEST=${{ matrix.strategy_name }}" -v $GITHUB_WORKSPACE:/src -v $GITHUB_WORKSPACE/gate_benchmarks:/home tbaudier/gatebenchmarks:9.4 /home/.github/workflows/runTest.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 713924a46..be2d046c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,8 +101,8 @@ STRING(REGEX REPLACE "(.*)[.](.*)[.](.*)" "\\3" G4VERSION_PATCH ${Geant4_VERSION #MESSAGE(${G4VERSION_MAJOR}) #MESSAGE(${G4VERSION_MINOR}) #MESSAGE(${G4VERSION_PATCH}) -IF(NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 11.1) - MESSAGE("Warning! This GATE version is not validated for Geant4 ${G4VERSION_MAJOR}.${G4VERSION_MINOR} distribution. Please use Geant4 11.1 distribution instead.") +IF(NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 11.2) + MESSAGE("Warning! This GATE version is not validated for Geant4 ${G4VERSION_MAJOR}.${G4VERSION_MINOR} distribution. Please use Geant4 11.2 distribution instead.") ENDIF() #========================================================= diff --git a/docs/vgate.rst b/docs/vgate.rst index b7aa6b506..f221368df 100644 --- a/docs/vgate.rst +++ b/docs/vgate.rst @@ -24,8 +24,8 @@ With vGate you can launch your first GATE simulation in just a few steps! No nee The following software is installed on this machine (see this `file `_ for more details): * Ubuntu LTS 22.04 on Virtual Box (40GB virtual HD) -* GATE 9.3 -* Geant4 11.1.1 +* GATE 9.4 +* Geant4 11.2.1 * GateContrib: a user-oriented public repository of Gate (macros, examples and user contributions) * Root 6.26.08 * libtorch cxx11 (cpu) 1.7.0 diff --git a/source/docker/Generate-9.4.sh b/source/docker/Generate-9.4.sh new file mode 100755 index 000000000..530a04cb7 --- /dev/null +++ b/source/docker/Generate-9.4.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +#Variables to modify +Repository=opengatecollaboration +ROOT_Version=v6-24-06 +CLHEP_Version=2.4.6.0 +Geant4_Version=11.2.1 +Gate_Version=9.4 + +#Variables to preserve +Geant4_Tag=$Repository/geant4:$Geant4_Version +Gate_Tag=$Repository/gate:$Gate_Version-docker + +docker build -t $Geant4_Tag -f DockerFileGeant \ + --build-arg ROOT_Version=$ROOT_Version \ + --build-arg CLHEP_Version=$CLHEP_Version \ + --build-arg Geant4_Version=v$Geant4_Version . +#docker push $Geant4_Tag +# +#docker build -t $Gate_Tag -f DockerFileGate \ +# --build-arg Geant4_Version=$Geant4_Tag \ +# --build-arg Gate_Version=v$Gate_Version . +#docker push $Gate_Tag diff --git a/source/docker/README.md b/source/docker/README.md index 885682e65..b0e218266 100644 --- a/source/docker/README.md +++ b/source/docker/README.md @@ -10,7 +10,7 @@ login: `docker login` [build and use] * build: - * `docker build -t opengatecollaboration/geant4:11.1.0 -f DockerFileGeant --build-arg ROOT_Version=v6-24-06 --build-arg Geant4_Version=v11.1.0 .` + * `docker build -t opengatecollaboration/geant4:11.2.1 -f DockerFileGeant --build-arg ROOT_Version=v6-24-06 --build-arg Geant4_Version=v11.2.1 .` * push: * `docker push opengatecollaboration/geant4:$version` * interactive: @@ -18,7 +18,7 @@ login: `docker login` Where: -* `$version` is `11.1.0` for gate `9.3` +* `$version` is `11.2.1` for gate `9.4` # Second image Gate ## Docker for gate @@ -29,7 +29,7 @@ login: `docker login` [build and use] * build: - * `docker build -t opengatecollaboration/gate:9.3 -f DockerFileGate --build-arg Geant4_Version=opengatecollaboration/geant4:11.1.0 --build-arg Gate_Version=v9.3 .` + * `docker build -t opengatecollaboration/gate:9.4 -f DockerFileGate --build-arg Geant4_Version=opengatecollaboration/geant4:11.2.1 --build-arg Gate_Version=v9.4 .` * push: * `docker push opengatecollaboration/gate:$version` * run command: diff --git a/source/docker/vGate.sh b/source/docker/vGate.sh index 4e15a67aa..4a0a64a56 100644 --- a/source/docker/vGate.sh +++ b/source/docker/vGate.sh @@ -69,7 +69,7 @@ make cd cd Software/Geant4 mkdir src bin install data -git clone -b v11.1.1 https://github.com/Geant4/geant4.git src +git clone -b v11.2.1 https://github.com/Geant4/geant4.git src cd bin ccmake ../src -DGEANT4_INSTALL_DATA=ON -DGEANT4_BUILD_MULTITHREADED=OFF -DGEANT4_INSTALL_DATADIR=/home/vgate/Software/Geant4/data -DCMAKE_INSTALL_PREFIX=/home/vgate/Software/Geant4/install -DGEANT4_BUILD_MULTITHREADED=OFF -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON make install From 65e05a59551710535e3b819141fe86927bda4f6e Mon Sep 17 00:00:00 2001 From: kochebina Date: Mon, 25 Mar 2024 09:44:37 +0100 Subject: [PATCH 2/4] t10 fix try2 --- source/physics/src/GateVProcess.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/physics/src/GateVProcess.cc b/source/physics/src/GateVProcess.cc index 43bd47061..16989f3e4 100644 --- a/source/physics/src/GateVProcess.cc +++ b/source/physics/src/GateVProcess.cc @@ -30,6 +30,9 @@ GateVProcess::GateVProcess(G4String name) theHandler = 0; mG4ProcessName = name; mKeepSec=false; + + //fix for G4 11.2.1 + G4HadronicParameters::Instance()->SetTimeThresholdForRadioactiveDecay( 3.171e+10*CLHEP::year ); } //----------------------------------------------------------------------------- From 3dc2532f6c6734fd3e5326e83e647ab39bf9ea06 Mon Sep 17 00:00:00 2001 From: kochebina Date: Mon, 25 Mar 2024 15:53:28 +0100 Subject: [PATCH 3/4] with include G4HadronicParameters.hh --- source/physics/src/GateVProcess.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/physics/src/GateVProcess.cc b/source/physics/src/GateVProcess.cc index 16989f3e4..8aaf8ffc3 100644 --- a/source/physics/src/GateVProcess.cc +++ b/source/physics/src/GateVProcess.cc @@ -18,7 +18,7 @@ #include "G4Element.hh" #include "G4VEnergyLossProcess.hh" #include "G4VMultipleScattering.hh" - +#include "G4HadronicParameters.hh" //----------------------------------------------------------------------------- GateVProcess::GateVProcess(G4String name) From 8bb41421c9fd5aa0c1eafbfe67d13678dfb4065a Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 26 Mar 2024 17:48:25 +0100 Subject: [PATCH 4/4] Remove t7_garf --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 984e80cbb..d3db8858a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -262,7 +262,6 @@ jobs: t3_range_e+, t4_necr, t6_dpk, - t7_garf, t8_LETActor, t10_SpectroGamma, t11_EMField,