当前位置: 首页 > news >正文

slurm设置用户节点和分区权限

在使用SLURM(Simple Linux Utility for Resource Management)管理计算资源时,正确地配置用户节点和分区的权限是非常重要的。这可以帮助你控制谁可以访问哪些资源以及他们可以做什么。以下是一些基本步骤和概念,帮助你设置和管理SLURM中的用户节点和分区权限。

  1. 理解SLURM的基本组件
    在开始配置之前,了解SLURM的基本组件是非常有帮助的:

节点(Nodes):计算资源的基本单元,可以是物理服务器或虚拟机。

分区(Partitions):节点的一个集合,可以定义不同的资源限制和优先级。

队列(Queues):用户提交作业的逻辑分组,通常与分区相关联。

  1. 配置分区
    在slurm.conf文件中配置分区,你可以定义哪些节点属于哪个分区,以及该分区的特定属性(如最大任务数、时间限制等)。例如:

PartitionName=normal Nodes=node[01-10] Default=YES MaxTime=24:00:00 State=UP
PartitionName=gpu Nodes=node[11-20] Default=NO MaxTime=72:00:00 GPUs=1 State=UP
3. 用户权限设置
3.1 使用slurm_acct/slurm_acct.conf配置文件
你可以在slurm_acct/slurm_acct.conf中设置用户对特定分区的访问权限。例如:

Account admin AccountingGroup=admin Users=admin,root
Account student AccountingGroup=student Users=student1,student2
3.2 使用slurm.conf中的AccountingStorageEnforce和AccountingStorageTRES
你可以在slurm.conf中设置哪些资源类型(TRES)应该被记录和强制执行。例如:

AccountingStorageEnforce=JobDump,Force,billing,tres SelectTypeParameters=billing=billing_group,tres=billing_group*ConsumableJobFactor
4. 用户组和权限管理
为了更细粒度地控制访问权限,你可以创建用户组并在SLURM配置中引用这些组:

slurm.conf 中的示例

UserParameters=billing_group AllowAccounts=admin,student DefaultAccount=student DefaultBillingGroup=student BillingGroup=billing_groupConsumableJobFactor,billing_groupConsumableTimeFactor,billing_groupConsumableNodeFactor,billing_groupConsumableCoreFactor,billing_groupConsumableGPUTimeFactor,billing_groupConsumableGPUTimeFactor,billing_groupConsumableMemoryFactor,billing_groupConsumableSwapFactor,billing_groupConsumableTmpDiskFactor,billing_groupConsumableEnergyFactor,billing_groupConsumableWeightFactor,billing_groupConsumableQOSFactor,billing_groupConsumableAccountingStorageFactor,billing_groupConsumableWattsFactor,billing_groupConsumableWeightJobFactor,billing_groupConsumableWeightTimeFactor,billing_groupConsumableWeightNodeFactor,billing_groupConsumableWeightCoreFactor,billing_groupConsumableWeightGPUTimeFactor,billing_groupConsumableWeightMemoryFactor,billing_groupConsumableWeightSwapFactor,billing_groupConsumableWeightTmpDiskFactor,billing_groupConsumableWeightEnergyFactor,billing_groupConsumableWeightQOSFactor,billing_groupConsumableWeightAccountingStorageFactor,billing_groupConsumableWeightWattsFactor
5. 重新加载SLURM配置并测试
每次修改slurm.conf或相关配置文件后,你需要重新加载SLURM配置:

sudo scontrol reconfigure
然后,你可以使用squeue, sinfo, sacct等命令来检查配置是否按预期工作。例如:

sinfo -o “%P %n” # 查看分区和对应的节点信息
squeue -u # 查看指定用户的作业队列状态
通过以上步骤,你可以有效地管理和控制SLURM中的用户节点和分区权限。确保根据你的具体需求调整配置文件中的参数。

http://www.lryc.cn/news/590386.html

相关文章:

  • Telink的GPIO
  • 系统思考场景应用
  • Node.js基础用法
  • 3DGS之COLMAP
  • iOS 抓包工具选择与配置指南 从零基础到高效调试的完整流程
  • VR 污水厂初体验:颠覆传统认知​
  • CSS全面系统教程:从入门到精通网页样式设计
  • 安全初级作业2
  • 基于SpringBoot+Uniapp球场预约小程序(腾讯地图API、Echarts图形化分析、二维码识别)
  • Vue在线预览Excel和Docx格式文件
  • 【IDEA】格式化代码工具配置
  • STM32硬件I2C的注意事项
  • c语言-数据结构-二叉树的遍历
  • 2025华为ODB卷-宜居星球改造计划200分-三语言题解
  • Jenkins credentials 增加了github credential 但是在Git SCM 凭证中不显示
  • Redis持久化RDB和AOF实现原理详细介绍
  • 将Android Studio创建的一个apk工程放到Android15源码中构建
  • mysql- 存储结构、存储函数,批量生成测试数据
  • ssl相关命令生成证书
  • 代码随想录算法训练营第五十天|图论part1
  • Python 日志轮换处理器的参数详解
  • watermark的作用
  • JS逆向 - YandexSmartCaptcha (worker线程)
  • Spring Boot 解决跨域问题
  • 基于SD-WAN的智慧高速解决方案:高效、低成本的智能交通实践
  • 高频面试雷区:Java Object六大核心方法源码剖析
  • socket和websocket的区别
  • python--杂识--20 sse与websocket区别
  • 【数据结构】栈与链表的区别
  • 构建足球实时比分APP:REST API与WebSocket接入方案详解