Cannot generate root output file

Hi,
I’m new to Gate simulation. To put you in the context, my simulation consists in generating dose maps and dose variation curves as a function of depth in the air with proton beams and alphas particles low energy coming from a particle accelerator in order to know the position of the target because I want very precise energies at the entrance of the target. I was able to generate the phase spaces at the exit of the accelerator and that I used as source to generate the dose maps and the yield in depth in the air. for this I created an air boxing that I attach DoseActor. unfortunately at the end of the simulation the root files are not generated and a message is displayed that I cannot resolve it. Thanks for your help.
we found the scripts, as well as the Slurm results bottom.

_Geant4 Version:10.7
_Gate : Version 9.1
_Operating System:centos-7-x86_64
_root : Version 6.20.00

this is execution script :
#!/bin/bash

#SBATCH --ntasks=1
#SBATCH --time=01:00:00
#SBATCH --mem-per-cpu=3G
#SBATCH --cpus-per-task=1

#In this script we will change the parameters in the mac files and loop through every parameter combination possible.
#If you want to add a simulation to the list, you only need to add the values that you want to run the simulations with in lists defined below.
#We start by going inside the temporary storage folder of the cc. We create a new folder inside of it that is named after the parameters of the simulation.
#We create several different folders because if there was only one there could be a chance of the output files getting mixed up.
#Inside those folders we copy the macro files that will be used to run Gate.
#Inside these new folders we edit the macro files that we just copied to change the parameters that we want to run the simulation with.
#Then we ask the cc to run the Gate simulations.
#And finally we copy the output files that the cc produced back to the original folder.

outputdir=“/sps/hadronth/imane/SpatialDistribution” #Directory where the mac, output and data folders are
execFile=“Gate mac/main.mac” #Execution command
pathGate=“/pbs/software/centos-7-x86_64/gate/9.1/” #Path to the Gate files on the cc

i=$1
j=$2
k=$3

PEnergy=(“3” “10” “15”)
HeEnergy=(“16” “24” “36”)

Part=(“P” “He”)

Angles=(“00deg” “05deg”)

#For filters
Z=(“1” “2”)
A=(“1” “4”)

cd $pathGate
source ccenv.sh

if [ $i == 0 ]
then
cd /tmp
echo 1
mkdir ${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose #Creating the folder used for the simulation inside the tmp folder
echo 2
cp -r $outputdir/mac /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose #Copying the different needed folders to run GATE in the tmp folder
echo 3
cp -r $outputdir/data /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose
echo 4
cd /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose #Getting inside of the newly created folder
echo 5
mkdir output
echo 6
cp $outputdir/Mains/${Part[$i]}Edep${Angles[$j]}.mac /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose/mac #We copy the prepared Main file and replace main.mac with it
cd /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose/mac
rm main.mac
mv ${Part[$i]}Edep${Angles[$j]}.mac main.mac
cd …
sed -i “s//gate/actor/DoseDistribution/save.*//gate/actor/DoseDistribution/save\ output/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dosedistribution.root/” mac/DoseDistribution.mac #This is were we set the name of the output files. Note that the method for naming the output files is consistent for the ThetaG scripts. If you want to change the way the output files are named, you will also need to edit those.

   	sed -i "s/\/gate\/actor\/DoseDistribution\/save.*/\/gate\/actor\/DoseDistribution\/save\	output\/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dosedistribution\.txt/" mac/DoseDistribution.ma
   	sed -i "s/\/gate\/actor\/DepthDose\/save.*/\/gate\/actor\/DepthDose\/save\	output\/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}DepthDose\.root/" mac/DepthDose.mac
   	sed -i "s/\/gate\/actor\/DepthDose\/save.*/\/gate\/actor\/DepthDose\/save\	output\/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}DepthDose\.txt/" mac/DepthDose.mac
$execFile #Running GATE
cp /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose/output/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dosedistribution.root $outputdir/output/Edep/${Part[$i]}/${Angles[$j]}/${PEnergy[$k]}MeV #Copying the output files into the original folder
cp /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose/output/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dosedistribution.txt $outputdir/output/Edep/${Part[$i]}/${Angles[$j]}/${PEnergy[$k]}MeV #Copying the output files into the original folder
cp /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose/output/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}DepthDose.root $outputdir/output/Edep/${Part[$i]}/${Angles[$j]}/${PEnergy[$k]}MeV #Copying the output files into the original folder
   	cp /tmp/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose/output/${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}DepthDose.txt $outputdir/output/Edep/${Part[$i]}/${Angles[$j]}/${PEnergy[$k]}MeV #Copying the output files into the original folder

cd /tmp
rm -r ${Part[$i]}${PEnergy[$k]}MeV${Angles[$j]}dose #We remove the folder that we created for the simumaltion to not pollute the tmp folder

Slurm results :

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : HAD_RDM_676
issued by : G4RadioactiveDecayBaseMessenger
This command is valid but deprecated and will be replaced with the command:
/process/had/rdm/verbose in the next major release, Geant4 version 11.0
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : HAD_RDM_674
issued by : G4RadioactiveDecayBaseMessenger
This command is valid but deprecated and will be replaced with the command:
/process/had/rdm/allVolumes in the next major release, Geant4 version 11.0
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

WARNING: command “/vis/viewer/update” could not be applied: no current viewer.
0 events have been kept for refreshing and/or reviewing.
“/vis/reviewKeptEvents” to review them one by one.
“/vis/enable”, then “/vis/viewer/flush” or “/vis/viewer/rebuild” to see them accumulated.
[Core-0] End of macro mac/main.mac
Graphics systems deleted.
Visualization Manager deleting…
cp: cannot stat ‘/tmp/P3MeV00degdose/output/P3MeV00degdosedistribution.root’: No such file or directory
cp: cannot stat ‘/tmp/P3MeV00degdose/output/P3MeV00degdosedistribution.txt’: No such file or directory
cp: cannot stat ‘/tmp/P3MeV00degdose/output/P3MeV00degDepthDose.root’: No such file or directory
cp: cannot stat ‘/tmp/P3MeV00degdose/output/P3MeV00degDepthDose.txt’: No such file or directory


  •                  SLURM Batch System                      *
    
  •       IN2P3 Computing Centre, Villeurbanne FR            *
    

Date: Fri Mar 15 10:47:35 CET 2024
Job informations can be found using these commands:
Accounting:
sacct -j 3471349
Efficiency:
seff 3471349


Please see the pinned post on How to post code snippets as it’s rather difficult to make sense of the code. I’d note that this looks more like a problem with the script or Gate, but if the main.mac file mentioned is using paths, please post that as well.

hi,
thinks for your answer, I found the error it was related to the naming with the output files.