微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

运行 MDART 协议时 NS 2.35 分段错误核心转储

如何解决运行 MDART 协议时 NS 2.35 分段错误核心转储

当我在 NS 2.35 中运行 MDART 路由协议 tcl 脚本时,它说:

 When configured,ns found the right version of tclsh in /usr/bin/tclsh8.6
but it doesn't seem to be there anymore,so ns will fall back on running the first tclsh in your path. The wrong version of tclsh may break the test suites. Reconfigure and rebuild ns if this is a problem. 

num_nodes is set 16

INITIALIZE THE LIST xListHead

channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,distCST_ = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0

SORTING LISTS ...DONE!

Segmentation fault (core dumped)

并且模拟结束时间假设在 205s 结束,但是当运行动画时,模拟在 8s 结束。这是为什么?谢谢

解决方法

ns 在 /usr/bin/tclsh8.6 中找到了正确版本的 tclsh 但是好像没有了

tcl8.6 :您应该使用“ns-2.35 tcl8.5.10”:它不会更改版本或位置。 (除非您移动 ns-allinone-2.35)。外部 tcl8.6 可以改变例如更新。后来的版本往往会丢失一些文件,例如在 Debian/Ubuntu 中。

示例https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing

$ tar xvf ns-allinone-2.35_gcc5.tar.gz     ## 2014 - 2017 update
$ cd ns-allinone-2.35/
$ export CC=gcc-4.8 CXX=g++-4.8 && ./install

分段错误

MDART 不能与现代操作系统一起使用。最新的工作是 16 个月前更新的 Ubuntu 18.04.4。请查看我的测试 https://drive.google.com/drive/folders/1si2jA3lc-23lubVHb3tFbIAXfnhRfg5O?usp=sharing ..... CentOS 8 失败,Ubuntu 20.04 失败。等“2021 OS”失败。

编辑:进一步测试显示更新的 Ubuntu 18.04 失败:MDART 的最新 Ubuntu 版本是 16.04。

注意 1:Ubuntu 16.04 nam 软件包已损坏。请使用 https://drive.google.com/file/d/0B7S255p3kFXNdmxzSmRzaVRWb28/view?usp=sharing → nam_1.15-10-ubuntu14_amd64.deb

注意 2:Ubuntu 16.04 ns 命令:sudo apt install ns2

注意 3:构建 ns-allinone-2.35/ → 在最新的 Ubuntu 更新后出现随机 Tk 错误的四种情况。可能的解决方案:将 ns-allinone-2.35_2021.tar.xz https://drive.google.com/file/d/167cP7hPnJGiNL3rK4Mxnh_-0t7_S8FTL/view?usp=sharing 与 Tcl 一起使用,Tk 更新到版本 8.5.17 .... 并且有额外的 gcc/g++ 编译器可以尝试使用三个选项 https://drive.google.com/drive/folders/1xVEATaYAwqvseBzYxKDzJoZ4-Hc_XOJm?usp=sharing

export CC=gcc447 CXX=g++447 && ./install     ## can also be used with ns-allinone-2.35 version 2011
export CC=gcc48 CXX=g++48 && ./install
export CC=gcc54 CXX=g++54 && ./install

模拟时间:设置为最大时间。示例:设置 set val(end) 1006.0 将运行大约 6 秒,并以:1000 simulation seconds ......结束输出文本。时间是相对的。 ns2 是在 90 年代开发的,当时处理器非常慢 Pentium 1 / Pentium 2 。 ...不同的协议在模拟时间上表现不同。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。