• 1. Den Inhalt als in /.vsccode/launch.json kopieren

    2. Im environment debugpy installieren (conda install debugpy)

    3. Slurm ausführungsbefehl anpassen:

    • [old] python main.py --args
    • [new] python -m debugpy --wait-for-client --listen 5999 main.py --args

    Flags: --wait-for-client: Optional, Skript wartet mit ausführung auf "attach" --listen: Port um sich am Prozess anzuhängen (siehe launch.json)

  • Troubleshooting

    • Connection Refused Wenn trotz ueberseinstimmender Ports der Prozess nicht attachbar ist, laeuft der Prozess moeglicherweise auf einer anderen Ressource. E.g VsCode SSH auf Cluster 1, Automatische Ressourcenverteilung → Python Prozess laeuft auf Cluster 2

    Loesung: Im WorkloadManager definieren auf welcher Ressource der Prozess laufen soll.

    E.g Cluster hat GPUs 1,2,3 → sbatch --exclude cliuster-gpu3,cluster-gpu2

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment