diff --git a/macro/PWG/common/production/config.json b/macro/PWG/common/production/config.json index c8f4c0cbf3c622eb756f3d1c5e19193f66a334b2..6b54e76fae86be926a7a9884d44e15cd5e187445 100644 --- a/macro/PWG/common/production/config.json +++ b/macro/PWG/common/production/config.json @@ -11,7 +11,7 @@ "excludeNodes": "", "logDir": "/lustre/cbm/users/${USER}/mc/out/log", "cbmRoot": "/cvmfs/cbm.gsi.de/debian10/cbmroot/feb23_fr_v18.6.7_fs_apr21p2/bin/CbmRootConfig.sh", - "jobScript": "${PWD}/run_sim_reco_json.sh", + "jobScript": "${VMCWORKDIR}/macro/PWG/common/production/run_sim_reco_json.sh", "transport": { "run": true, "plutoShift": 0, @@ -31,9 +31,9 @@ "transport": { "input": [ {"generator": "unigen", - "file": "/lustre/cbm/users/ogolosov/mc/generators/dcmqgsm_smm/auau/pbeam12agev/mbias/root/dcmqgsm_${taskId}.root"}, + "file": "/lustre/cbm/pwg/common/mc/generators/dcmqgsm_smm/auau/pbeam12agev/mbias/root/dcmqgsm_${taskId}.root"}, {"generator": "pluto", - "file": "/lustre/cbm/users/ogolosov/mc/generators/pluto/auau/pbeam12agev/w/w.zip#w_${plutoFileId}.root", + "file": "/lustre/cbm/users/galatyuk/pluto/epem/12gev/w_pluto/sum_w_1000_001.zip#w_${plutoFileId}.root", "plutoPdg": 0}, {"#generator": "beam", "beamA": 197, @@ -121,7 +121,7 @@ "input": [ {"id": 0, "path": "/lustre/cbm/users/${USER}/mc/out/tra/${taskId}/${taskId}", - "rate": "1.e3", + "rate": "1.e7", "treeAccessMode": "regular", "parameterSource": false}, {"id": -1, @@ -165,7 +165,7 @@ ], "rawFile": "/lustre/cbm/users/${USER}/mc/out/raw/${taskId}/${taskId}", "recFile": "/lustre/cbm/users/${USER}/mc/out/reco/${taskId}/${taskId}", - "unigenFile": "/lustre/cbm/users/ogolosov/mc/generators/dcmqgsm_smm/auau/pbeam12agev/mbias/root/dcmqgsm_${taskId}.root", + "unigenFile": "/lustre/cbm/pwg/common/mc/generators/dcmqgsm_smm/auau/pbeam12agev/mbias/root/dcmqgsm_${taskId}.root", "output": { "path": "/lustre/cbm/users/${USER}/mc/out/AT/${taskId}/${taskId}", "overwrite": false} diff --git a/macro/PWG/common/production/run_json.sh b/macro/PWG/common/production/run_json.sh index b21d0e8c41892719b5812bece0c0aa383d0cfb2f..b4a8582d72405992d8353cc5f7628dbafab6e6fa 100755 --- a/macro/PWG/common/production/run_json.sh +++ b/macro/PWG/common/production/run_json.sh @@ -43,11 +43,11 @@ submitScript=${0} echo "Submit script : ${submitScript}" config=${1} batch=$(getJsonVal "['accessory']['batch']") -jobScript=$(getJsonVal "['accessory']['jobScript']") export cbmRoot=$(getJsonVal "['accessory']['cbmRoot']") cbmRoot="${cbmRoot} -a" echo "CbmRoot : ${cbmRoot}" source ${cbmRoot} +jobScript=$(getJsonVal "['accessory']['jobScript']") steps="transport digitization reconstruction AT" for step in ${steps}; do diff --git a/macro/PWG/common/production/run_sim_reco_json.sh b/macro/PWG/common/production/run_sim_reco_json.sh index 4d084b0630a827810626850286a8cf47172faddc..c021763609a2ff772e36f6544cec32e16e2e9583 100755 --- a/macro/PWG/common/production/run_sim_reco_json.sh +++ b/macro/PWG/common/production/run_sim_reco_json.sh @@ -1,8 +1,11 @@ #!/bin/bash -export RED='\033[0;31m' +# Colored printout +export RED='\033[1;31m' export GREEN='\033[1;32m' +export CYAN='\033[1;36m' export NC='\033[0m' +export BOLD='\033[1m' function getTraList () { traFiles=$(getJsonVal "['${step}']['traFiles']") @@ -21,7 +24,12 @@ steps="transport digitization reconstruction AT" source ${cbmRoot} for step in ${steps}; do readStepInfo + start=`date +%s` if [ ${run} == true ]; then + echo "Maschine : $(uname -n)" + echo " " + echo " " + echo -e "${CYAN} ##### Starting step : ${step} ##### ${NC}" export taskId=${SLURM_ARRAY_TASK_ID} plutoShift=$(getJsonVal "['accessory']['transport']['plutoShift']") export plutoFileId=$(printf %05d $((${taskId}-${plutoShift}))) @@ -44,8 +52,8 @@ for step in ${steps}; do isL1Matching=$(getJsonVal "['reconstruction']['isL1Matching']") isL1EffQA=$(getJsonVal "['reconstruction']['isL1EffQA']") echo " " - echo "Run reconstruction: ${macro}(\"${rawFile}\",${nTimeSlices},${firstTimeSlice},\"${outFile}\",\ - ${overwrite},\"${sEvBuildRaw}\",\"${config}\",\"${traList}\",${isL1Matching},${isL1EffQA})" + echo -e "${BOLD} Run reconstruction: ${macro}(\"${rawFile}\",${nTimeSlices},${firstTimeSlice},\"${outFile}\",\ + ${overwrite},\"${sEvBuildRaw}\",\"${config}\",\"${traList}\",${isL1Matching},${isL1EffQA}) ${NC}" root -b -l -q "${macro}(\"${rawFile}\",${nTimeSlices},${firstTimeSlice},\"${outFile}\",\ ${overwrite},\"${sEvBuildRaw}\",\"${config}\",\"${traList}\",${isL1Matching},${isL1EffQA})" &> ${log} if [ $? -eq 0 ]; then @@ -66,8 +74,8 @@ for step in ${steps}; do tslength=$(getJsonVal "['digitization']['timeSliceLength']") fi echo " " - echo "Run AT converter: ${macro}(\"${traList}\",\"${rawFile}\",\"${recFile}\",\ - \"${unigenFile}\",\"${outFile}\",${overwrite},\"${config}\",\"${tslength}\")" + echo -e "${BOLD} Run AT converter: ${macro}(\"${traList}\",\"${rawFile}\",\"${recFile}\",\ + \"${unigenFile}\",\"${outFile}\",${overwrite},\"${config}\",\"${tslength}\") ${NC}" root -b -l -q "${macro}(\"${traList}\",\"${rawFile}\",\"${recFile}\",\ \"${unigenFile}\",\"${outFile}\",${overwrite},\"${config}\",\"${tslength}\")" &> ${log} if [ $? -eq 0 ]; then @@ -85,19 +93,19 @@ for step in ${steps}; do cp -v ${input}.par.root ${outDir} fi echo " " - echo "Run digitization: ${macro}(\"${config}\",${nEvents})" + echo -e "${BOLD} Run digitization: ${macro}(\"${config}\",${nEvents}) ${NC}" fi if [ ${step} == transport ]; then echo " " - echo "Run transport: ${macro}(\"${config}\",${nEvents})" + echo -e "${BOLD} Run transport: ${macro}(\"${config}\",${nEvents}) ${NC}" fi root -b -l -q "${macro}(\"${config}\",${nEvents})" &> ${log} if [ $? -eq 0 ]; then echo -e "${GREEN} ${step} executed successfully ${NC}" else - echo -e "${GREEN} ${step} failed ${NC}" + echo -e "${RED} ${step} failed ${NC}" exit 1 fi fi @@ -106,7 +114,7 @@ for step in ${steps}; do rm -v .rootrc if [ ${step} == reconstruction ]; then if [ "${isL1EffQA}" == true ]; then - rm -v *{core,moni,CA}* all_*.par + rm -v *{core,moni,CA,Fair}* all_*.par else rm -v *{core,moni,CA,L1,Edep}* all_*.par fi @@ -118,6 +126,12 @@ for step in ${steps}; do rm -v *{core,CA,L1}* fi + echo " " + end=`date +%s` + runtime=$((end-start)) + echo "Runtime : ${runtime}s" + echo " " + cd - export taskId= fi