-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis.sh
28 lines (24 loc) · 876 Bytes
/
analysis.sh
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
#!/bin/bash
#SBATCH -J analysis
#SBATCH -o log/analysis/%j-analysis.out
#SBATCH -e log/analysis/%j-analysis.out
echo `hostname`
# dirpath=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 6) #6个随机字符
# mkdir "/dev/shm/$dirpath"
# ~/s3mount uparxive /dev/shm/$dirpath --profile hansen --max-threads 16 --maximum-throughput-gbps 25 --endpoint-url http://10.140.31.254:80 --prefix json/
declare -a pids
START=$2
SUBCHUNKSIZE=$3
CHUNKSIZE=$4
for ((CPU=0; CPU<SUBCHUNKSIZE; CPU++));
do
TRUEINDICES=$(($CPU+$START))
nohup python scan_and_validation.py --root $1 --index_part $TRUEINDICES --num_parts $CHUNKSIZE \
--datapath http://10.140.52.123:8000/get_data --savepath uparxive:s3://uparxive/files \
> log/convert/thread.$TRUEINDICES.log 2>&1 &
pids[$CPU]=$!
done
for pid in "${pids[@]}"; do
wait $pid
done
echo "All processes have completed."