如何从python脚本导入变量以获取作业脚本

时间:2018-08-05 20:03:29

标签: python sh slurm

我试图在HPC中运行CFD模拟,并且想从Python导入Wall Clock Time。谁能建议我最好的方法。

Python代码

# Python variables
walltime = 10000 #sec

Slurm File

# ===========================================
# Code to import from python.
# ===========================================
#!/bin/bash
#SBATCH --export=NONE                   #Do not propagate environment
#SBATCH --get-user-env=L                #Replicate login environment
#SBATCH --job-name="CFD Simulation"     #Set the job name
#SBATCH --time=$walltime                 #Set the wall clock limit

0 个答案:

没有答案