Slrum使用

参考港科广HPC用户手册

  • 分区名查看网站
  • 申请卡之前最后使用screentmux等指令开启可恢复窗口,避免电脑断点无法连接
  • GPU占用率不满xx%超过9个小时会警告,每个月超过十个警告会停止用户使用权限。所以空闲或者睡觉的时候需要跑keepbusy.py占用
  • 目前申请1卡大概等待5h

出现找不到slrum指令

修改环境变量export PATH=$PATH:/opt/slurm/bin

  • 想用开机自启使用vim ~/.bashrc修改启动设置,将export PATH=$PATH:/opt/slurm/bin添加到最后一行

    nvcc –version 没有找到这个指令

    /usr/local也没有对应的CUDAx.x的文件夹,是因为HPC(High-Performance Computing)/服务器通常使用“模块(module)”来管理软件环境。

  • 运行命令 module avail,看看列表里有没有类似 cudacudatoolkit 的条目。
  • 从上面的列表里选择一个版本进行加载。例如,加载 12.1 版本:module load cuda/12.1
  • 取消load是使用module unload xx

快速调试

srun -p debug -n 4 --gres=gpu:1 --time=00:30:00 --pty bash

  • debug分区有8卡40G,每个人最多使用30min,所以适合快速调试,同时等待时间很短。
  • -n代表CPU总核心数量

分配GPU

  • 首先是申请GPU,salloc -p xx -n 4 --gres=gpu:1,等待GPU分配
    • 随后可以使用srun python xx.py
    • 或者使用srun --pty bash调出计算节点的bash,之后正常使用nvidia-smipython xx.py
    • 常用的分区指令是salloc -p i64m1tga800ue -n 4 --gres=gpu:1

卡死

squeue -u <username> 找到自己的job id ,然后使用scancel <jobid>直接中断作业

  • 目前遇到卡死的情况,是在运行module avail之后使用ctrl+C。gpu分区是1-2

避免警告

通过创建批处理文件来自动在程序结束后运行keepbusy.py程序。

#注意当前路径
chmod +x xx.sh
./xx.sh
#!/bin/bash
python 1.py
python keepbusy.py

持续监测GPU使用情况

正常的多终端应该使用:watch -n 1 nvidia-smi 在slurm系统可用sgview -j <作业号> 相当于使用一次

缺乏ffmpeg,不一定要从module加载

也可以使用conda install -c conda-forge ffmpeg在环境下安装,同样可以使用。

修改transformer找缓存的路径

export TRANSFORMERS_CACHE=/hpc2hdd/home/yhuang489/.cache/huggingface/hub

This line appears after every note.

Notes mentioning this note

There are no notes linking to this note.


Here are all the notes in this garden, along with their links, visualized as a graph.

Conda导出python环境加快访问github新闻稿实验1:ros入门实验3:自动驾驶实战实验4:ros2智能移动机器人实验5:ros1移动机器人动态避障(基于强化学习)实验6:轨迹跟踪仿真1最终实验自动驾驶辅助python函数Obsidian发布的免费替代方案Obsidian库解析TestYour first seedClip 串讲Icml'23 blip 2 bootstrapping language Image pre...Nips'17 attention is all you needSigir'22 cret cross Modal retrieval transformer...Arxiv 2306’unifying large language models and...Arxiv'21 how much can clip benefit vision And...⭐ ⭐ ⭐ ⭐ ⭐ arxiv 2311' llmsurveychinese⭐⭐⭐⭐eccv'22 slip:self Supervision meets language...⭐⭐⭐⭐⭐clip:learning transferable visual models from...⭐⭐⭐⭐⭐icml'22 blip bootstrapping language Image pre...Acl'25 a survey of mathematical reasoning in the...Arxiv'23 challenges and applications of large...Prl'20 retrieving quantum information with active...SIGIR'06 Laplacian Optimal Design for Image...Survey'09active learningTKDE'16Relevance Feedback Algorithms Inspired By...Arxiv'2501 ursa understanding and verifying chain...Cikm'24 infinitymath a scalable instruction tuning...Icml'25 cogmath assessing llms’ authentic...Icml'25 forest Of Thought scaling test Time...⭐⭐⭐arxiv'2502 hinteval a comprehensive framework...⭐⭐⭐arxiv'2506 scida scientific dynamic assessor of...⭐⭐⭐⭐acl'24 champ a competition Level dataset for...⭐⭐⭐⭐arxiv'2505 soft thinking unlocking the...⭐⭐⭐⭐⭐arxiv'2505 reasoning with omnithought a...⭐⭐⭐⭐⭐arxiv'2506 thought anchors which llm...Improving interpretable embeddings for ad Hoc...Access'17...Artif. intell. rev.‘23 a survey on ensemble...Fcs'20 a survey on ensemble learningTpmai'04 asymmetric bagging and random subspace...⭐⭐⭐⭐access'22 a survey of ensemble learning进化集成学习算法综述《黑客与画家》 为什么书呆子不受欢迎《黑客与画家》《黑客与画家》——黑客与画家黑客伦理250701 250708 阅读250709 250716 阅读250717 250723 阅读250722 250729 阅读250729 250805 阅读Avs检索流程Avs项目管理Avs speaker proposalAvs paper思路整理Presentation 思路整理Stable Diffusion检索流程2023avs交互使用flask快速构建浏览器实现图片交互Trecvid avs 个人感受2022交互情况统计2024avs交互情况统计Llm api测试Agi 比赛Lean(vs code)Agic TrickLlm相关论文Rtx 4090 部署大模型 20240306构建样题数据集调查开源大模型的数学能力想法计划231128调研Github下载Python调用javaVbs2024比赛复盘复现系统talkseeDiffusion扩散模型调研2023 mindspore量子计算黑客马拉松全国大赛热身题2023 mindspore量子计算黑客马拉松初赛——量子组合优化赛道代码集成进化算法Python使用Vscode使用Github问题HuggingfaceLinuxSlrum使用华为手机安装google框架工具推荐科研问题笔记本电脑视频生成调研20241002更换内存条(16g换到32g)24考研总结Reflection 大学四年的回顾及年终总结Fairymusicbox上手2025 港科广mphil 学分安排&选课李沐讲座干眼症的习惯考研计划《周处除三害》观后感《奥本海默》观后感《白金数据》书评牛奶2023 mindspore量子计算黑客马拉松初赛——量子组合优化赛道排序融合动手学习深度学习算法笔记论文阅读模板算法知识生活Paper ReadingProjectsWeekly Summary