【发布时间】:2016-09-08 22:23:11
【问题描述】:
我希望能够在 bash 文件中运行命令并将其保存在 somefile.txt 中
我正在按以下方式运行我的脚本:
- sbatch file.sh 在这个文件中我有一个终端命令
【问题讨论】:
标签: bash terminal output sbatch
我希望能够在 bash 文件中运行命令并将其保存在 somefile.txt 中
我正在按以下方式运行我的脚本:
【问题讨论】:
标签: bash terminal output sbatch
目标:使用 sbatch 启动作业时捕获特定终端命令的输出
目前的工作解决方案:
例子:
#!/bin/bash
#SBATCH --job-name application1
#SBATCH --partition=TSA
#SBATCH --nodelist=node52
module load openmpi/1.10.2/gcc/4.9.3
mpirun -np 1 NASA.IS
# I have placed the python call at the end because I want to capture
# the time it took for the application to run and save it to a file
# I was able to code everything inside the python file and generate the
# corresponding data
python outputCollector.py
【讨论】: