Python的SLURM工具
项目描述
pySlurmUtils
从Python调度作业的SLURM工具。
该库的主要目的是提供一个适用于SLURM的concurrent.futures.Executor
实现,可用于任何机器,而不仅仅是SLURM客户端。
pip install pyslurmutils
from pyslurmutils.concurrent.futures import SlurmRestExecutor
with SlurmRestExecutor(
url=url, # SLURM REST URL
user_name=user_name, # SLURM user name
token=token, # SLURM access token
log_directory="/path/to/log", # for log files (optional)
data_directory="/path/to/data", # TCP communication when not provided
pre_script="module load ewoks", # load environment (optional)
parameters={"time_limit": 120} # SLURM job parameters (optional)
python_cmd="python", # python command (python3 by default)
) as executor:
future = executor.submit(sum, [1, 1])
assert future.result() == 2
文档
项目详情
关闭
pyslurmutils-0.2.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d535b3ecc4c03aebe1573301d401139654e72284e1f448ae15fba4349466829f |
|
MD5 | 43f3cd289b25bd9bcd929c1e40aed583 |
|
BLAKE2b-256 | 450c1f87d114747439f3dabc26010148b3f7bd2f96c1acb9e363db3c5ca842ba |