slurmでcryoSPARCを運用する場合.

cluster_info.jsoncluster_script.shは下記コマンドで取得できます.

cryosparcm cluster example slurm

cluster_info.json

中身はこんな感じ

{
    "name" : "slurmcluster",
    "worker_bin_path" : "/path/to/cryosparc_worker/bin/cryosparcw",
    "cache_path" : "/path/to/local/SSD/on/cluster/nodes",
    "send_cmd_tpl" : "ssh loginnode {{ command } }",
    "qsub_cmd_tpl" : "sbatch {{ script_path_abs } }",
    "qstat_cmd_tpl" : "squeue -j {{ cluster_job_id } }",
    "qstat_code_cmd_tpl": "squeue -j {{ cluster_job_id } } --format=%T | sed -n 2p",
    "qdel_cmd_tpl" : "scancel {{ cluster_job_id } }",
    "qinfo_cmd_tpl" : "sinfo"
}

***Pukiwikiの表記のため一部表記を変えてます***

ただ、、「qstat_code_cmd_tpl」のコマンド行が微妙でエラーになる場合がある. そのため

"qstat_code_cmd_tpl": "squeue -j {{ cluster_job_id } } --format=%T | sed -n 2p",
 ↓
"qstat_code_cmd_tpl": "squeue --noheader -j {{ cluster_job_id } } --format=%T",

とした方がいいかも.

cluster_info.json内にある「qstat_code_cmd_tpl」のコマンド行が微妙でエラーになります
どうもパイプ(|)がダメらしくて下記に変更します

cluster_script.sh

中身はこんな感じ

#!/usr/bin/env bash
#### cryoSPARC cluster submission script template for SLURM
## Available variables:
## {{ run_cmd } }            - the complete command string to run the job
## {{ num_cpu } }            - the number of CPUs needed
## {{ num_gpu } }            - the number of GPUs needed.
##                            Note: The code will use this many GPUs starting from dev id 0.
##                                  The cluster scheduler has the responsibility
##                                  of setting CUDA_VISIBLE_DEVICES or otherwise enuring that the
##                                  job uses the correct cluster-allocated GPUs.
## {{ ram_gb } }             - the amount of RAM needed in GB
## {{ job_dir_abs } }        - absolute path to the job directory
## {{ project_dir_abs } }    - absolute path to the project dir
## {{ job_log_path_abs } }   - absolute path to the log file for the job
## {{ worker_bin_path } }    - absolute path to the cryosparc worker command
## {{ run_args } }           - arguments to be passed to cryosparcw run
## {{ project_uid } }        - uid of the project
## {{ job_uid } }            - uid of the job
## {{ job_creator } }        - name of the user that created the job (may contain spaces)
## {{ cryosparc_username } } - cryosparc username of the user that created the job (usually an email)
##
## What follows is a simple SLURM script:
 
#SBATCH --job-name cryosparc_{{ project_uid } }_{{ job_uid } }
#SBATCH -n {{ num_cpu } }
#SBATCH --gres=gpu:{{ num_gpu } }
#SBATCH --partition=gpu
#SBATCH --mem={{ (ram_gb*1000)|int } }M
#SBATCH --output={{ job_dir_abs } }/slurm.out
#SBATCH --error={{ job_dir_abs } }/slurm.err
 
{{ run_cmd } }

***Pukiwikiの表記のため一部表記を変えてます***

最新の60件
2025-12-09 2025-12-08 2025-12-07 2025-12-05 2025-11-30 2025-11-27 2025-11-24 2025-11-23 2025-11-19 2025-11-18 2025-11-16 2025-11-05 2025-11-03 2025-11-02 2025-10-31 2025-10-30 2025-10-29 2025-10-28 2025-10-26 2025-10-25 2025-10-24 2025-10-22 2025-10-21 2025-10-17 2025-10-13 2025-10-11 2025-10-06 2025-10-05 2025-09-30 2025-09-29 2025-09-28 2025-09-25 2025-09-24 2025-09-23 2025-09-21 2025-09-20 2025-09-14 2025-09-13

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-10-25 (土) 01:58:43