【发布时间】:2016-07-29 17:01:17
【问题描述】:
只有一个主机:
<host id="Worker1" speed="1Mf" core="101"/>
此主机上仅部署一个进程:
<process host="Worker1" function="worker"/>
worker函数如下:
int worker(int argc, char *argv[])
{
MSG_host_set_property_value(MSG_host_self(), "activeCore", "0", xbt_free_f);
MSG_task_execute(MSG_task_create("kot", 10e6, 0, NULL));
XBT_INFO("I've executed some stuff and changed my value");
MSG_host_set_property_value(MSG_host_self(), "activeCore", "1", xbt_free_f);
return 0;
}
当我第二次使用MSG_host_set_property_value 时,Segmentation fault 会引发。
如何避免?
我知道xbt_free_f中的原因。如果我将其更改为 NULL 模拟将正常工作。但我担心这会影响生产力。
【问题讨论】:
标签: properties platform simgrid