Skip to content

Commit 4c48c6a

Browse files
committed
phase 3 config and removed phase 2 logic from main expriment run analysis function
1 parent b5eb37f commit 4c48c6a

11 files changed

Lines changed: 366 additions & 471 deletions

File tree

docs/HPC_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ watch -n 10 "ls -1 results_JOBID | wc -l"
4747
4848
# Fetching the results once the job is done
4949
50-
scp -r kanagnostopoul@snellius.surf.nl:~/CSS_Project/results/phase1_ 18682575/ ./results/
50+
scp -r kanagnostopoul@snellius.surf.nl:~/CSS_Project/results/phase2_18693004/ ./results/
5151
```
5252

5353
The jobscript template can be found in ```run_analysis.sh``` (default rome paritition).

hpc/run_phase2.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#SBATCH --nodes=1
55
#SBATCH --ntasks=1
66
#SBATCH --cpus-per-task=32
7-
#SBATCH --time=08:00:00
8-
#SBATCH --mem=16G
9-
#SBATCH --output=pp_phase2_%j.out
10-
#SBATCH --error=pp_phase2_%j.err
7+
#SBATCH --time=04:00:00
8+
#SBATCH --mem=64G
9+
#SBATCH --output=/home/kanagnostopoul/CSS_Project/pp_phase2_%j.out
10+
#SBATCH --error=/home/kanagnostopoul/CSS_Project/pp_phase2_%j.err
1111

1212
# =============================================================================
1313
# PP Hydra Effect - Phase 2: Self-Organization (SOC Test)

hpc/run_phase3.sh

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#!/bin/bash
2+
#SBATCH --job-name=pp_phase3
3+
#SBATCH --partition=rome
4+
#SBATCH --nodes=1
5+
#SBATCH --ntasks=1
6+
#SBATCH --cpus-per-task=32
7+
#SBATCH --time=02:00:00
8+
#SBATCH --mem=64G
9+
#SBATCH --output=/home/kanagnostopoul/CSS_Project/pp_phase3_%j.out
10+
#SBATCH --error=/home/kanagnostopoul/CSS_Project/pp_phase3_%j.err
11+
12+
# =============================================================================
13+
# PP Hydra Effect - Phase 3: Finite-Size Scaling
14+
# =============================================================================
15+
#
16+
# PHASE 3: Test finite-size scaling at critical point
17+
# - Grid sizes: 50, 100, 250, 500, 1000
18+
# - 20 replicates per size = 100 simulations
19+
# - Cluster size distributions for power-law analysis
20+
#
21+
# SUBMIT: sbatch run_phase3.sh
22+
# MONITOR: squeue -u $USER
23+
# CANCEL: scancel <job_id>
24+
#
25+
# =============================================================================
26+
27+
cd /home/kanagnostopoul/CSS_Project || exit 1
28+
29+
echo "========================================"
30+
echo "PP Hydra Effect - Phase 3"
31+
echo "========================================"
32+
echo "Job ID: $SLURM_JOB_ID"
33+
echo "Node: $(hostname)"
34+
echo "CPUs: $SLURM_CPUS_PER_TASK"
35+
echo "Start: $(date)"
36+
echo "Working dir: $(pwd)"
37+
echo "========================================"
38+
39+
# -----------------------------------------------------------------------------
40+
# Environment Setup
41+
# -----------------------------------------------------------------------------
42+
source ~/snellius_venv/bin/activate
43+
44+
# Prevent numpy/scipy from spawning extra threads (joblib handles parallelism)
45+
export OMP_NUM_THREADS=1
46+
export OPENBLAS_NUM_THREADS=1
47+
export MKL_NUM_THREADS=1
48+
export NUMEXPR_NUM_THREADS=1
49+
50+
# -----------------------------------------------------------------------------
51+
# Run Phase 3
52+
# -----------------------------------------------------------------------------
53+
OUTPUT_DIR="results/phase3_${SLURM_JOB_ID}"
54+
mkdir -p $OUTPUT_DIR
55+
56+
echo ""
57+
echo "Output directory: $OUTPUT_DIR"
58+
echo ""
59+
60+
# Dry run first to verify setup
61+
echo "Dry run check:"
62+
python3 -u scripts/experiments.py \
63+
--phase 3 \
64+
--output $OUTPUT_DIR \
65+
--cores $SLURM_CPUS_PER_TASK \
66+
--dry-run
67+
68+
echo ""
69+
echo "Starting Phase 3..."
70+
echo ""
71+
72+
# Run phase 3
73+
python3 -u scripts/experiments.py \
74+
--phase 3 \
75+
--output $OUTPUT_DIR \
76+
--cores $SLURM_CPUS_PER_TASK
77+
78+
# -----------------------------------------------------------------------------
79+
# Completion
80+
# -----------------------------------------------------------------------------
81+
echo ""
82+
echo "========================================"
83+
echo "Phase 3 Complete"
84+
echo "========================================"
85+
echo "End time: $(date)"
86+
echo "Results in: $OUTPUT_DIR/"
87+
echo ""
88+
echo "Output files:"
89+
ls -lh $OUTPUT_DIR/
90+
echo ""
91+
echo "Next steps:"
92+
echo " 1. Download phase3_results.jsonl"
93+
echo " 2. Analyze cluster size distributions P(s) for each grid size"
94+
echo " 3. Fit power-law exponent tau from P(s) ~ s^(-tau)"
95+
echo " 4. Check finite-size cutoff s_max ~ L^D (fractal dimension)"
96+
echo "========================================"
97+
EOF

hpc_data/phase2_18684370/experiments.log

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)