forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdatadistribution.sh
More file actions
executable file
·50 lines (41 loc) · 1.84 KB
/
datadistribution.sh
File metadata and controls
executable file
·50 lines (41 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
[[ -z $GEN_TOPO_MYDIR ]] && GEN_TOPO_MYDIR="$(dirname $(realpath $0))"
source $GEN_TOPO_MYDIR/setenv.sh || { echo "setenv.sh failed" 1>&2 && exit 1; }
if [[ `which StfBuilder 2> /dev/null | wc -l` == "0" ]]; then
eval "`alienv shell-helper`"
alienv --no-refresh load DataDistribution/latest
fi
# For benchmark only, do NOT copy&paste!
[[ $NUMAGPUIDS == 1 ]] && [[ -z $SHM_MANAGER_SHMID ]] && export DATADIST_SHM_DELAY=10
if [[ -n $DD_STARTUP_DELAY ]]; then
sleep $DD_STARTUP_DELAY
fi
if [[ -z $INPUT_FILE_LIST ]]; then
DD_INPUT_CMD="--data-source-dir $RAWINPUTDIR/raw/timeframe"
else
DD_INPUT_CMD="--data-source-file-list $INPUT_FILE_LIST"
if [[ -z $INPUT_FILE_COPY_CMD ]]; then
DD_INPUT_CMD+=" --data-source-copy-cmd \"XrdSecPROTOCOL=sss,unix xrdcp -N root://eosaliceo2.cern.ch/?src ?dst\""
else
DD_INPUT_CMD+=" --data-source-copy-cmd \"$INPUT_FILE_COPY_CMD\""
fi
fi
if [[ $NTIMEFRAMES != -1 ]]; then
export DATADIST_FILE_READ_COUNT=$NTIMEFRAMES
DD_INPUT_CMD+=" --data-source-repeat"
fi
export TFRATE=$(awk "BEGIN {printf \"%.6f\",1/$TFDELAY}")
ARGS_ALL="--session ${OVERRIDE_SESSION:-default} --severity $SEVERITY --shm-segment-id 2 --shm-segment-size 1000000 --no-cleanup"
[[ -n $SHM_MANAGER_SHMID ]] && SHM_TOOL_OPTIONS=" --shmid $SHM_MANAGER_SHMID --data-source-region-shmid 100 --data-source-header-shmid 101"
eval StfBuilder --id stfb --discovery-partition FST --transport shmem \
--dpl-channel-name dpl-chan --channel-config "name=dpl-chan,type=push,method=bind,address=ipc://${UDS_PREFIX}${INRAWCHANNAME},transport=shmem,rateLogging=1" \
$DD_INPUT_CMD \
--data-source-rate=${TFRATE} \
--data-source-regionsize=${DDSHMSIZE} \
--data-source-headersize=${DDHDRSIZE} \
--data-source-enable \
--data-source-preread 5 \
--shm-no-cleanup on \
--shm-monitor false \
--control=static \
${ARGS_ALL} ${SHM_TOOL_OPTIONS}