surge 是一个用于分布式计算的工具,主要功能包括启动和停止任务、读取和写入数据、处理结果并输出。以下是 surge 的使用指南
基本命令
-
启动任务
start surge --task "任务名称"
--task:指定任务名称。-s:启用同步处理(建议使用)。
-
起动多个任务
start surge --task1 "任务1名称" --task2 "任务2名称"
- 使用
--task分别指定两个任务。
- 使用
-
运行任务
run surge --env "环境变量名" --task "任务名称"
--env:指定运行环境(如节点数和进程数)。
-
读取输入
input surge --task --input "输入文件名"
--input:指定读取输入的文件名。
-
写入输出
write surge --task --output "输出文件名"
--output:指定写入的输出文件名。
-
打印结果
print surge --task --output "结果文件名"
-
存储结果
store surge --task --store "存储路径名"
--store:指定存储结果的路径。
-
停止任务
stop surge --task "任务名称"
数据输入输出
- 读取输入:文件名需要指定,必须存在。
- 写入输出:文件名需要指定,可以是空白文件或已存在的文件。
销毁和同步处理
-
错误处理
error surge --task --error "错误信息"
-
同步处理
priority --high
--priority:指定优先级(高优先级high,低优先级low)。
-
异步处理
priority --low
任务同步与处理
-
同步处理
--synchronous
任务之间同步处理。
-
异步处理
--asynchronous
任务之间异步处理。
集成与同步条件
-
同步条件
priority --high --synchronous
同步处理且高优先级。
-
异步条件
priority --low --asynchronous
异步处理且低优先级。
启动多个任务
start surge --task1 "任务1" start surge --task2 "任务2"
预先配置同步条件
priority --high --synchronous
启动任务并处理输入输出
start surge --task "任务1" start surge --task "任务2" run surge --env "环境变量" --task "任务1" --input "input.txt" run surge --env "环境变量" --task "任务2" --env "任务1" --input "input2.txt"
启动任务并同步处理
start surge --task "任务1" start surge --task "任务2" --priority --high --synchronous run surge --env "环境变量" --task "任务1" run surge --env "环境变量" --task "任务2"
启动多个任务并同步处理
start surge --task1 "任务1" start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous
启动多个任务并同步处理输入输出
start surge --task1 "任务1" --priority --high --synchronous start surge --task2 "任务2" --priority --low --asynchronous start surge --task3 "任务3" --priority --high --synchronous
启动任务并输出结果
start surge --task "任务1" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt"
启动多个任务并同步处理结果
start surge --task1 "任务1" --priority --high --synchronous start surge --task2 "任务2" --priority --low --asynchronous start surge --task3 "任务3" --priority --high --synchronous
启动任务并同步处理输入输出
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous
启动任务并同步处理输入输出并输出结果
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt"
启动多个任务并同步处理输入输出并输出结果
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt"
启动任务并同步处理输入输出并存储结果
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt" store surge --task "任务1" --store "存储路径名"
启动多个任务并同步处理输入输出并存储结果
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt" store surge --task "任务1" --store "存储路径名"
启动任务并同步处理输入输出并停止
start surge --task "任务1" --priority --low --asynchronous start surge --task "任务2" --priority --high --synchronous start surge --task "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt" store surge --task "任务1" --store "存储路径名" stop surge --task "任务1"
启动多个任务并同步处理输入输出并存储结果并停止
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt" store surge --task "任务1" --store "存储路径名" stop surge --task "任务1"
启动任务并同步处理输入输出并存储结果并停止
start surge --task1 "任务1" --priority --low --asynchronous start surge --task2 "任务2" --priority --high --synchronous start surge --task3 "任务3" --priority --low --asynchronous run surge --env "环境变量" --task "任务1" print surge --task "任务1" --output "结果.txt" store surge --task "任务1" --store "存储路径名" stop surge --task "任务1"
启动多个任务并同步处理输入

如果没有特点说明,本站所有内容均由蘑菇VPN加速器-VPN极速全球网络加速器神器 App | 26年最新翻墙软件原创,转载请注明出处!