TWCC
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • Note Permission
    • Read
      • Owners
      • Signed-in users
      • Everyone
      Owners Signed-in users Everyone
    • Write
      • Owners
      • Signed-in users
      • Everyone
      Owners Signed-in users Everyone
    • More (Comment, Invitee)
    • Publishing
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions and GitLab Sync
    • Transfer ownership
    • Delete this note
    • Template
    • Insert from template
    • Export
    • Google Drive Export to Google Drive
    • Import
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Sharing Help
Menu
Options
Versions and GitLab Sync Transfer ownership Delete this note
Export
Google Drive Export to Google Drive
Import
Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
More (Comment, Invitee)
Publishing
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with GitLab
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Slurm常用指令與參數 :::success 下表為Slurm常用之指令: <tr> <td></td> <td></td> </tr> <table> <tr> <td>指令</td> <td>功能說明</td> </tr> <tr> <td>sinfo</td> <td>查詢佇列(Partitiond)清單與節點狀態 </td> </tr> <tr> <td>squeue</td> <td > 查詢已提交的Job狀態</td> </tr> <tr> <td>sbatch</td> <td>(建議) 以batch方式提交Job,適合多節點運算。<br>必須指定--account=<PROJECT_ID></br></td> </tr> <tr> <td> srun</td> <td> 提交Job,直接執行指令且需等待指令執行完成,適合需即時查看輸出的程式除錯工作。 <br>在sbatch腳本或salloc shell中,代表一個工作步驟(Job Step)。</br> </td> </tr> <tr> <td>salloc</td> <td>提交互動式Job,自動產生一個Shell,離開Shell後Job將自動終止,亦可直接登入Job分配的計算節點,適合用於計算程式開發與除錯工作。 <br>必須指定 --account=<PROJECT_ID></PROJECT_ID></br> </td> </tr> <tr> <td>squeue</td> <td>查詢已提交的Job狀態</td> </tr> <tr> <td>scontrol</td> <td>查詢執行中Job的詳細資訊,如CPU、Memory與節點分配數量</td> </tr> <tr> <td>scancel</td> <td>停止Job</td> </tr> <tr> <td>sacct</td> <td>列出帳號以往執行過的Job與Job>列出帳號以往執行過的Job與Job steps。若沒指定時間,預設查詢過去24小時的Job清單。</td> </tr> </table> <font color="#f00"> 備註: 萬一登入節點當機時,若原本使用 ==srun==或是==salloc== 指令提交 job,可能會造成計算中斷或資料遺失,因此除了除錯或開發用途之外,建議先編輯好job script,然後使用 ==sbatch== 指令提交計算工作。 </font> ::: ### sinfo | 指令參數 | 說明 | |-|-| | sinfo | 查看partition與節點資訊 | | sinfo --states=idle | 查看可用(idle)節點資訊 | | sinfo --partition=<partition> | 查看特定partition資訊 | | sinfo -N -l | 查詢節點狀態 | | sinfo --help | 查看所有選項 | ### squeue | 指令參數 | 說明 | |-|-| | squeue | 查看已提交的Job狀態資訊 | | squeue -j <job_id> | 查看特定Job資訊 | | squeue -l | 查看細節資訊 | | squeue --state=<state> | 查看特定狀態的Job。常用的state有:R(Running)、PD(Pending) | | squeue --help | 查看所有的選項 | <!--- :::info 補充說明 派送job過程中,常見的PENDING的情況,可以去查詢官方網址查詢原因。 [官網_job_reason_codes](https://slurm.schedmd.com/job_reason_codes.html) `[user@cbi-lgn01 ~]$ squeue -u user` `JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)` `8260 normal singular user PD 0:00 2 (MaxGRESPerAccount) ` (MaxGRESPerAccount):這通常與資源限制或配額有關。 ::: ---> ### scontrol | 指令參數 | 說明 | |-|-| | scontrol show job <job_id> | 查看排隊或正在運行的Job詳細資訊 | | scontrol show node <node> | 查看計算節點可用資源規格 | ### scancel | 指令參數 | 說明 | |-|-| | scancel <job_id> | 刪除Job | | scancel -i -u $UID | 互動式詢問刪除用戶自己的Job | ### sacct | 指令參數 | 說明 | |-|-| | sacct | 列出過去24小時內結束的Job清單 | | sacct -j <job_id> | 列出指定的已結束Job | | sacct --starttime $(date -d "7 days ago" +%Y-%m-%d) | 列出過去7天內結束的Job清單 | | sacct --help | 查看所有的選項 |

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lost their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.


Upgrade

All
  • All
  • Team
No template.

Create a template


Upgrade

Delete template

Do you really want to delete this template?

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Sign in via SAML

Help

  • English
  • 中文
  • 日本語

Documents

Tutorials

Book Mode Tutorial

Slide Example

YAML Metadata

Resources

Releases

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions

Versions and GitLab Sync

Sign in to link this note to GitLab Learn more
This note is not linked with GitLab Learn more
 
Add badge Pull Push GitLab Link Settings
Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitLab

      Please authorize HackMD on GitLab

      Please sign in to GitLab and authorize HackMD to access your projects. Learn more

       Sign in to GitLab

      Push the note to GitLab Push to GitLab Pull a file from GitLab

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Available push count

      Upgrade

      Pull from GitLab

       
      File from GitLab
      File from HackMD

      GitLab Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitLab file changes after unlink.

      Syncing

      Push failed

      Push successfully