-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubmit_2DA_VR2.sh
More file actions
executable file
·53 lines (43 loc) · 1.33 KB
/
submit_2DA_VR2.sh
File metadata and controls
executable file
·53 lines (43 loc) · 1.33 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
51
52
53
#!/bin/bash
# Submit Condor jobs for 2DAlphabet VR2 processing
echo "=========================================="
echo " Condor Submission for 2DA VR2 Analysis"
echo "=========================================="
# Step 1: Generate input file
echo ""
echo "[Step 1/3] Generating input file from histogram directory..."
python3 generate_condor_inputs.py
if [ $? -ne 0 ]; then
echo "ERROR: Failed to generate input file!"
exit 1
fi
# Step 2: Validate input file
echo ""
echo "[Step 2/3] Validating input file..."
if [ ! -f "input_2DA_VR2.txt" ]; then
echo "ERROR: input_2DA_VR2.txt not found!"
exit 1
fi
# Check if template config exists
template_config=$(tail -n +2 input_2DA_VR2.txt | head -1 | cut -d',' -f1 | tr -d ' ')
if [ ! -f "$template_config" ]; then
echo "ERROR: Template config $template_config not found!"
exit 1
fi
# Create logs directory
if [ ! -d "logs" ]; then
echo "Creating logs directory..."
mkdir -p logs
fi
# Count number of jobs
njobs=$(tail -n +2 input_2DA_VR2.txt | wc -l)
echo "Number of jobs to submit: $njobs"
echo "Template config: $template_config"
# Step 3: Submit to Condor
echo ""
echo "[Step 3/3] Submitting to Condor..."
condor_submit condor_2DA_VR2.cfg
echo ""
echo "=========================================="
echo " Submission Complete!"
echo "=========================================="