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

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=08:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --job-name=train_tokenizer_default_single_gpu_60x80

# 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_train=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/val


job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

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

env | grep SLURM

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --image_height=60 \
    --image_width=80 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=48 \
    --name=doom-tokenizer-default-60x80-$slurm_job_id \
    --tags tokenizer doom default 60x80 \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val
SLURM_JOB_USER=tum_cte0515
SLURM_TASKS_PER_NODE=1
SLURM_JOB_UID=999226
SLURM_TASK_PID=2284439
SLURM_JOB_GPUS=1
SLURM_LOCALID=0
SLURM_SUBMIT_DIR=/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine
SLURMD_NODENAME=hkn0735
SLURM_JOB_START_TIME=1759762729
SLURM_CLUSTER_NAME=hk
SLURM_JOB_END_TIME=1759791529
SLURM_CPUS_ON_NODE=6
SLURM_JOB_CPUS_PER_NODE=6
SLURM_GPUS_ON_NODE=1
SLURM_GTIDS=0
SLURM_JOB_PARTITION=accelerated
SLURM_TRES_PER_TASK=cpu=5
SLURM_OOM_KILL_STEP=0
SLURM_JOB_NUM_NODES=1
SLURM_JOBID=3546543
SLURM_JOB_QOS=normal
SLURM_PROCID=0
SLURM_CPUS_PER_TASK=5
SLURM_NTASKS=1
SLURM_TOPOLOGY_ADDR=hkibb.hkibbi1.hkibbi1e9.hkn0735
SLURM_TOPOLOGY_ADDR_PATTERN=switch.switch.switch.node
SLURM_SCRIPT_CONTEXT=prolog_task
SLURM_NODELIST=hkn0735
SLURM_JOB_ACCOUNT=hk-project-p0023960
SLURM_PRIO_PROCESS=0
SLURM_NPROCS=1
SLURM_NNODES=1
SLURM_SUBMIT_HOST=hkn1991.localdomain
SLURM_JOB_ID=3546543
SLURM_NODEID=0
SLURM_CONF=/etc/slurm/slurm.conf
SLURM_JOB_NAME=train_tokenizer_default_single_gpu_60x80
SLURM_NTASKS_PER_NODE=1
SLURM_JOB_GID=502226
SLURM_JOB_NODELIST=hkn0735
GpuFreq=control_disabled
E1006 16:59:36.189201 2284565 cuda_platform.cc:51] failed call to cuInit: INTERNAL: CUDA error: Failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 812, in backends
    backend = _init_backend(platform)
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 896, in _init_backend
    backend = registration.factory()
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 559, in make_pjrt_c_api_client
    return xla_client.make_c_api_client(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jaxlib/xla_client.py", line 156, in make_c_api_client
    return _xla.get_c_api_client(
           ^^^^^^^^^^^^^^^^^^^^^^
jaxlib._jax.XlaRuntimeError: FAILED_PRECONDITION: No visible GPU devices.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/jasmine/train_tokenizer.py", line 574, in <module>
    main(args)
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/jasmine/train_tokenizer.py", line 273, in main
    num_devices = jax.device_count()
                  ^^^^^^^^^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 975, in device_count
    return int(get_backend(backend).device_count())
               ^^^^^^^^^^^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 944, in get_backend
    return _get_backend_uncached(platform)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 923, in _get_backend_uncached
    bs = backends()
         ^^^^^^^^^^
  File "/hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/.venv/lib64/python3.12/site-packages/jax/_src/xla_bridge.py", line 828, in backends
    raise RuntimeError(err_msg)
RuntimeError: Unable to initialize backend 'cuda': FAILED_PRECONDITION: No visible GPU devices. (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)
srun: error: hkn0735: task 0: Exited with exit code 1

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

Job ID: 3546543
Cluster: hk
User/Group: tum_cte0515/hk-project-p0023960
Account: hk-project-p0023960
State: FAILED (exit code 1)
Partition: accelerated
Nodes: 1
Cores per node: 6
Nodelist: hkn0735
CPU Utilized: 00:00:04
CPU Efficiency: 1.42% of 00:04:42 core-walltime
Job Wall-clock time: 00:00:47
Starttime: Mon Oct  6 16:58:49 2025
Endtime: Mon Oct  6 16:59:36 2025
Memory Utilized: 351.93 MB
Memory Efficiency: 0.28% of 121.46 GB (121.46 GB/node)
Energy Consumed: 11110 Joule / 3.08611111111111 Watthours
Average node power draw: 236.382978723404 Watt