#simulator #networking #modular #interconnection

app caminos

模块化互连网络模拟器

18 个版本

0.6.3 2023 年 12 月 1 日
0.6.2 2023 年 10 月 13 日
0.6.1 2023 年 7 月 13 日
0.5.4 2023 年 2 月 24 日
0.1.1 2020 年 11 月 24 日

#23 in 模拟

Download history

58 每月下载量

MIT/Apache

12KB

caminos

这个 crate 以二进制形式提供 CAMINOS 模拟器。大多数功能来自 caminos-lib crate。

用法

要使用此模拟器,首先安装它。

$ cargo install caminos

然后你应该能够运行它。

$ caminos --help

要执行单次模拟,创建一个文件 my_experiment.cfg 并执行模拟器。有关其格式的文档,请参阅 caminos-lib crate。

$ caminos my_experiment.cfg

您可以将 --results 标志设置为将模拟结果写入其中,而不是写入 stdout。

对于更复杂的实验,建议创建一个新的目录 /path/to/my/experiment。此目录应包括一个文件 main.cfg,其中描述要执行的实验,以及一个文件 main.od,其中描述要生成的输出。它可能包含一个文件 remote,以帮助从远程位置 pull 结果文件。然后,要本地运行所有模拟并生成输出,请执行以下操作。

$ caminos /path/to/my/experiment

使用 SLURM 执行模拟

如果我们有权访问具有 SLURM 队列系统的机器,则可以按照以下方式进行。

  • 创建具有其 main.cfg 的本地实验。
  • 创建 /path/to/my/experiment/remote
[
	Remote{
		name: "default",
		host: "the.remote.host",
		username: "myusername",
		root: "/path/in/the/remote/machine/to/my/experiment",
		binary: "/path/in/the/remote/to/caminos",
	},
]
  • 执行推送以在远程创建文件。
local$ caminos /path/to/my/experiment --action=push
  • 登录到远程机器。
  • 创建 slurm 作业
the.remote.host$ caminos /path/in/the/remote/machine/to/my/experiment --action=slurm
  • 关闭与远程机器的连接。
  • 拉取结果。即使只有少数已结束,也会指示还有多少尚未完成。
local$ caminos /path/to/my/experiment --action=pull
  • 如果您愿意,现在可以生成所需的输出。
local$ caminos /path/to/my/experiment --action=output

特殊模式

special 标志启用除了模拟场景之外的其他模式。目前,唯一的此类可用模式是导出拓扑。通过设置 --special=export--special_args='Export{...}',它将创建一个拓扑文件。以下是一个示例命令。

$ caminos --special=export --special_args='Export{topology:RandomRegularGraph{routers:500,degree:20,servers_per_router:1},seed:5,filename:"the_topology_file"}'

依赖项

~19–30MB
~443K SLoC