[tab] /hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/lam/train_lam_minecraft_8node_darkness_filter_400M_3465198.log (log)
#!/usr/bin/env bash

#SBATCH --nodes=8
#SBATCH --ntasks-per-node=4
#SBATCH --time=48:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:4
#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/lam/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/lam/%x_%j.log
#SBATCH --job-name=train_lam_minecraft_8node_darkness_filter_400M
#SBATCH --reservation=llmtum
#SBATCH --requeue
#SBATCH --signal=b:usr1@300 # 5 min before timeout

# --- signal trap to requeue job before timeout ---
requeue_job() {
    echo "[$(date)] caught sigusr1 (timeout warning), requeueing slurm job $SLURM_JOB_ID..."
    scontrol requeue $SLURM_JOB_ID
    exit 0
}

trap requeue_job sigusr1

# set checkpoint flag based on restart count
restart_count=$(scontrol show job $SLURM_JOB_ID | grep -o 'Restarts=[0-9]*' | cut -d'=' -f2)

if [ $restart_count -eq 0 ]; then
    restore_ckpt_flag="--no-restore-ckpt"
else
    restore_ckpt_flag="--restore-ckpt"
fi

# Log the sbatch script
cat $0

module unload mpi/openmpi/5.0
module unload devel/cuda/12.4
source .venv/bin/activate

array_records_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_new/open_ai_minecraft_arrayrecords_chunked

job_name=$SLURM_JOB_NAME
# slurm_job_id=$SLURM_JOB_ID
slurm_job_id=3454954

CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/mihir/lam/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python train_lam.py \
    --save_ckpt \
    --restore_ckpt \
    --wandb_id $slurm_job_id \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=160 \
    --init_lr=0 \
    --max_lr=1e-4 \
    --darkness_threshold=50 \
    --log_image_interval=1000 \
    --log \
    --log_checkpoint_interval=1000 \
    --name=lam-minecraft-8-node-darkness-filter-400M-$slurm_job_id \
    --tags lam minecraft 8-node darkness-filter 400M \
    --entity instant-uv \
    --project jafar \
    --num_latents=100 \
    --model_dim=1024 \
    --num_blocks=12 \
    --num_heads=16 \
    --latent_dim=64 \
    --ffn_dim=4096 \
    --data_dir $array_records_dir &

child_pid=$!

wait $child_pid
/var/spool/slurmd/job3465198/slurm_script: line 39: .venv/bin/activate: No such file or directory
SLURM_JOB_USER=tum_cte0515
SLURM_TASKS_PER_NODE=4(x8)
SLURM_JOB_UID=999226
SLURM_TASK_PID=2876239
SLURM_JOB_GPUS=0,1,2,3
SLURM_LOCALID=0
SLURM_SUBMIT_DIR=/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs
SLURMD_NODENAME=hkn0532
SLURM_JOB_START_TIME=1756977884
SLURM_CLUSTER_NAME=hk
SLURM_JOB_END_TIME=1757150684
SLURM_CPUS_ON_NODE=24
SLURM_JOB_CPUS_PER_NODE=24(x8)
SLURM_GPUS_ON_NODE=4
SLURM_GTIDS=0
SLURM_JOB_PARTITION=accelerated
SLURM_TRES_PER_TASK=cpu=5
SLURM_OOM_KILL_STEP=0
SLURM_JOB_NUM_NODES=8
SLURM_JOBID=3465198
SLURM_JOB_QOS=normal
SLURM_PROCID=0
SLURM_CPUS_PER_TASK=5
SLURM_JOB_RESERVATION=llmtum
SLURM_NTASKS=32
SLURM_TOPOLOGY_ADDR=hkibb.hkibbi1.hkibbi1e11.hkn0532
SLURM_TOPOLOGY_ADDR_PATTERN=switch.switch.switch.node
SLURM_SCRIPT_CONTEXT=prolog_task
SLURM_NODELIST=hkn[0532-0533,0536,0722-0723,0728,0731,0813]
SLURM_JOB_ACCOUNT=hk-project-p0023960
SLURM_PRIO_PROCESS=0
SLURM_NPROCS=32
SLURM_NNODES=8
SLURM_SUBMIT_HOST=hkn1990.localdomain
SLURM_JOB_ID=3465198
SLURM_NODEID=0
SLURM_CONF=/etc/slurm/slurm.conf
SLURM_JOB_NAME=train_lam_minecraft_8node_darkness_filter_400M
SLURM_NTASKS_PER_NODE=4
SLURM_JOB_GID=502226
SLURM_JOB_NODELIST=hkn[0532-0533,0536,0722-0723,0728,0731,0813]
GpuFreq=control_disabled
GpuFreq=control_disabled
GpuFreq=control_disabled
GpuFreq=control_disabled
GpuFreq=control_disabled
GpuFreq=control_disabled
GpuFreq=control_disabled
GpuFreq=control_disabled
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
srun: error: hkn0723: tasks 16-19: Exited with exit code 1
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine_jobs/train_lam.py", line 16, in <module>
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
    import grain
ModuleNotFoundError: No module named 'grain'
srun: error: hkn0813: tasks 28-31: Exited with exit code 1
srun: error: hkn0536: tasks 8-11: Exited with exit code 1
srun: error: hkn0722: tasks 12-15: Exited with exit code 1
srun: error: hkn0728: tasks 20-23: Exited with exit code 1
srun: error: hkn0533: tasks 4-7: Exited with exit code 1
srun: error: hkn0532: tasks 0-3: Exited with exit code 1
srun: error: hkn0731: tasks 24-27: Exited with exit code 1

============================= JOB FEEDBACK =============================

Job ID: 3465198
Cluster: hk
User/Group: tum_cte0515/hk-project-p0023960
Account: hk-project-p0023960
State: FAILED (exit code 1)
Partition: accelerated
Nodes: 8
Cores per node: 24
Nodelist: hkn[0532-0533,0536,0722-0723,0728,0731,0813]
CPU Utilized: 00:01:36
CPU Efficiency: 0.42% of 06:17:36 core-walltime
Job Wall-clock time: 00:01:58
Starttime: Thu Sep  4 11:24:44 2025
Endtime: Thu Sep  4 11:26:42 2025
Memory Utilized: 4.20 GB (estimated maximum)
Memory Efficiency: 0.00% of 0.00 MB (0.00 MB/node)
Energy Consumed: 575026 Joule / 159.729444444444 Watthours
Average node power draw: 4873.10169491525 Watt