switch off parallel for conversion and added script to test conversion

This commit is contained in:
Dmitry Ozerov
2020-09-29 17:28:58 +02:00
committed by Dmitry Ozerov
parent 95ae7d8011
commit 5453f38e9f
2 changed files with 51 additions and 1 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ with ju.File(
mask=mask,
gap_pixels=gap_pixels,
geometry=geometry,
parallel=True,
parallel=False,
) as juf:
n_input_frames = len(juf["data"])
good_frames = np.nonzero(juf["is_good_frame"])[0]
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
export PATH=/home/dbe/miniconda3/bin:$PATH
source deactivate >/dev/null 2>&1
source activate conversion
export NUMBA_NUM_THREADS=$1
OUTDIR=/sf/alvra/data/p18674/raw/run_info/003000/CONVERSION-PAR-${NUMBA_NUM_THREADS}
#coreAssociatedBuffer=(35 34 33 32 31 30 29 28 27 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 8 7 6 5 4 3 2 1 0)
#coreAssociatedBuffer=(35 34 33 32 31 30 29 28 27 18 19 20 21 22 23 24 25 26 9 10 11 12 13 14 15 16 17 8 7 6 5 4 3 2 1 0)
#coreAssociatedBuffer=(35 26 34 25 33 24 32 23 31 22 30 21 29 20 28 19 27 18 17 8 16 7 15 6 14 5 13 4 12 3 11 2 10 1 9)
coreAssociated="35,26,34,25,33,24,32,23,31,22,30,21,29,20,28,19,27,18"
for N in 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35
do
for n in `seq -f %02g 1 $N`
do
sleep 0.1
# c=`echo $n - 1 | bc`
# echo process : $n cores : ${coreAssociatedBuffer[10#${c}]}
echo process : $n cores :${coreAssociated}
rm -rf /sf/alvra/data/p18674/raw/run_info/003000/conversion_0030${n}.log
# taskset -c ${coreAssociatedBuffer[10#${c}]} python /home/dbe/git/sf_daq_buffer/scripts/export_file.py /sf/alvra/data/p18674/raw//RAW_DATA/test_16M/run_0030${n}.JF06T32V02.h5 /sf/alvra/data/p18674/raw/test_16M/run_0030${n}.JF06T32V02.h5 /sf/alvra/data/p18674/raw/run_info/003000/run_0030${n}.json /gpfs/photonics/swissfel/buffer/config/stream-JF06.json > /sf/alvra/data/p18674/raw/run_info/003000/conversion_0030${n}.log &
taskset -c ${coreAssociated} python /home/dbe/git/sf_daq_buffer/scripts/export_file.py /sf/alvra/data/p18674/raw//RAW_DATA/test_16M/run_0030${n}.JF06T32V02.h5 /sf/alvra/data/p18674/raw/test_16M/run_0030${n}.JF06T32V02.h5 /sf/alvra/data/p18674/raw/run_info/003000/run_0030${n}.json /gpfs/photonics/swissfel/buffer/config/stream-JF06.json > /sf/alvra/data/p18674/raw/run_info/003000/conversion_0030${n}.log &
done
echo Submitted
A=0
while [ $A -lt 30 ]
do
sleep 30
A=`grep read /sf/alvra/data/p18674/raw/run_info/003000/conversion_003001.log | wc -l`
echo Number of cycles passed $A
done
K=`ps -fe | grep export | grep -v grep | awk '{print $2}' | xargs`
echo Killing `ps -fe | grep export | grep -v grep | awk '{print $2}' | wc -l` processes ${K}
kill -9 ${K}
sleep 2
mkdir -p ${OUTDIR}/${N}
mv /sf/alvra/data/p18674/raw/run_info/003000/conversion_0030* ${OUTDIR}/${N}/.
done