2016-04-17 36 views
0

什么是模拟异常情况与主机网络的SimGrid方式?例如,如何建模链接路线的中断? Master创建一些taskdsend它的工人。但是如果链接断开,这个任务将会丢失。但master不知道有关断开的链接,并可能继续dsendtaskworkerSimGrid。模型异常情况

修订

我添加.fail文件platform.xml的state_file属性。

PERIODICITY 10.0 
1.0 1 
2.0 0 

发生错误时,worker停止工作。 处理它的方法是什么?你需要为

** SimGrid: UNCAUGHT EXCEPTION received on java(2): category: action canceled; value: 0 
** �; 
** Thrown by LHCb.Tier1() in this process 
[Tier1_1:LHCb.Tier1:(2) 2.000000] /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/xbt/ex.c:140: [xbt_ex/CRITICAL] �; 

** In _ZN7simgrid4java11JavaContext4stopEv() at /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/bindings/java/JavaContext.cpp:144 
** In SIMIX_process_yield() at /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/simix/smx_process.cpp:1014 
** In simcall_execution_wait() at /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/simix/libsmx.cpp:276 
** In MSG_parallel_task_execute() at /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/msg/msg_gos.cpp:90 
** In MSG_host_del_task() at /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/msg/msg_vm.cpp:521 
** In ExceptionOccurred() at /usr/lib/jvm/java-7-openjdk-amd64/include/jni.h:825 
** In ?? at [0x7f7aa8e09d98] 

回答

2

一切都存在于SimGrid的失败的名义下,但不幸的是有点稀疏文件。你想添加一个状态跟踪文件到你的主机或链接。请参阅the documentationplatform tutorial。您可以在文件examples/platforms/faulty_host.xml中找到存档中使用的示例。

请注意,它描述了主机的故障,但链路故障完全相同,在XML中也可以给出状态文件。

+0

我更新了问题。 –

2

该消息并未说明发生了错误,但发现了一个异常但未被捕获(未发现异常)。然后回答“处理它的方式是什么?”是添加一个try/catch块。由于它是模拟应用程序的一部分,而不是模拟工具包的责任,所以在catch块中做什么取决于您(重新发送,中止,显示消息...)。

+0

问题是,这是一个C异常,因为绑定中的内部错误而导致java仿真死亡。 –

相关问题