ns3 test.py

376 views
Skip to first unread message

Andy Tu

unread,
Nov 18, 2021, 3:32:14 AM11/18/21
to ns-3-users
Hello all!
Trying to set up nsm on my mac os, M1 chip laptop. I cannot pass all tests after running test.py.

Modules built:

antenna                   aodv                      applications

bridge                    buildings                 config-store

core                      csma                      csma-layout

dsdv                      dsr                       energy

fd-net-device             flow-monitor              internet

internet-apps             lr-wpan                   lte

mesh                      mobility                  netanim

network                   nix-vector-routing        olsr

point-to-point            point-to-point-layout     propagation

sixlowpan                 spectrum                  stats

test (no Python)          topology-read             traffic-control

uan                       virtual-net-device        visualizer

wave                      wifi                      wimax


Modules not built (see ns-3 tutorial for explanation):

brite                     click                     dpdk-net-device

mpi                       openflow                  tap-bridge

.....
.....

[730/735] PASS: Example src/wifi/examples/wifi-manager-example --wifiManager=MinstrelHt --standard=802.11ax-6GHz --serverChannelWidth=160 --clientChannelWidth=160 --serverShortGuardInterval=3200 --clientShortGuardInterval=3200 --serverNss=1 --clientNss=1 --stepTime=0.1

[731/735] PASS: Example src/wifi/examples/wifi-bianchi --validate --phyMode=OfdmRate6Mbps --nMinStas=5 --nMaxStas=10 --duration=15

[732/735] PASS: Example src/wifi/examples/wifi-manager-example --wifiManager=MinstrelHt --standard=802.11ax-5GHz --serverChannelWidth=160 --clientChannelWidth=160 --serverShortGuardInterval=1600 --clientShortGuardInterval=1600 --serverNss=4 --clientNss=4 --stepTime=0.1

[733/735] PASS: Example src/wifi/examples/wifi-manager-example --wifiManager=MinstrelHt --standard=802.11ax-5GHz --serverChannelWidth=160 --clientChannelWidth=160 --serverShortGuardInterval=3200 --clientShortGuardInterval=3200 --serverNss=4 --clientNss=4 --stepTime=0.1

[734/735] PASS: Example src/wifi/examples/wifi-manager-example --wifiManager=MinstrelHt --standard=802.11ax-6GHz --serverChannelWidth=160 --clientChannelWidth=160 --serverShortGuardInterval=1600 --clientShortGuardInterval=1600 --serverNss=4 --clientNss=4 --stepTime=0.1

[735/735] PASS: Example src/wifi/examples/wifi-manager-example --wifiManager=MinstrelHt --standard=802.11ax-6GHz --serverChannelWidth=160 --clientChannelWidth=160 --serverShortGuardInterval=3200 --clientShortGuardInterval=3200 --serverNss=4 --clientNss=4 --stepTime=0.1

729 of 735 tests passed (729 passed, 3 skipped, 2 failed, 1 crashed, 0 valgrind errors)

List of SKIPped tests:

    ns3-tcp-cwnd (requires NSC)

    ns3-tcp-interoperability (requires NSC)

    nsc-tcp-loss (requires NSC)

List of FAILed tests:

    int64x64

    tcp-rto-test

List of CRASHed tests:

    src/flow-monitor/examples/wifi-olsr-flowmon.py


I followed instructions on the wiki to download and build ns3. Any tips/suggestions for troubleshooting? Thanks!



Tom Henderson

unread,
Nov 18, 2021, 11:45:39 AM11/18/21
to ns-3-...@googlegroups.com

Perhaps this is the first reported experience of ns-3 on an M1.  I don't have access to one yet.  Can you please run the failed tests to output

$ ./test.py -s int64x64 -t out.int64x64

$ ./test.py -s tcp-rto-test -t out.tcp-rto-test

and send us the resulting text files generated?

Also, if you can run the following command and share the error output that is printed?

$ ./waf --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py

Thanks,

Tom

Andy Tu

unread,
Nov 18, 2021, 11:31:44 PM11/18/21
to ns-3-users
Hi Tom,
Attached are the 2 out.* files. Here is the output from


(nsm) nd2@Andys-MacBook-Pro ns-3.35 % ./waf --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py

Waf: Entering directory `/Users/nd2/Documents/ns-3-allinone/ns-3.35/build'

Waf: Leaving directory `/Users/nd2/Documents/ns-3-allinone/ns-3.35/build'

Build commands will be stored in build/compile_commands.json

'build' finished successfully (0.547s)

Command ['/Users/nd2/Documents/pyenv-versions/nsm/bin/python3', 'src/flow-monitor/examples/wifi-olsr-flowmon.py'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --gdb").


Thanks!


out.int64x64.txt
out.tcp-rto-test.txt

Gabriel

unread,
Nov 20, 2021, 4:15:52 PM11/20/21
to ns-3-users
Would you mind running the following code just to check the size of long double?  
I ask this cause windows also fails the int64x64 test due to 64bit long double while Mac and Linux use 80bits.

#include <stdio.h>
int main(int argc, char *argv[])
{
 int longdsize = sizeof(long double);
 printf("%d", longdsize);
}

Andy Tu

unread,
Nov 21, 2021, 1:23:17 PM11/21/21
to ns-3-users
Hi Gabriel,
The output is 

8, so 64 bits?




Gabriel

unread,
Nov 21, 2021, 1:34:04 PM11/21/21
to ns-3-users
Exactly. It's the same issue then, at least for the int64x64 test. 

Gabriel

unread,
Nov 21, 2021, 1:42:02 PM11/21/21
to ns-3-users
Forgot to mention it, but at least on x86 you can 
configure the floating point unit precision to change to 80-bit.
Only tested it on Linux (for WSLv1, which uses Windows FPU settings) , 
but maybe there is an Arm equivalent setting. 

Andy Tu

unread,
Nov 21, 2021, 2:13:01 PM11/21/21
to ns-3-users
Thanks for the tip! I will try that out. 

Tommaso Pecorella

unread,
Nov 21, 2021, 5:25:28 PM11/21/21
to ns-3-users
I did create an issue specific to this: #487

At the moment I can't foresee a simple solution to this, but for sure we'll need to handle it.

Note that from a preliminary analysis the problem affects how a int64x64 number is converted from and to a long double (int64x64 is a floating point number, despite the name).

We'll need to check if and how this affects the simulator performance and precision and decide 1) how to make the test pass, and 2) if we need a workaround or simply a system to let the test not fail.

Mattia Lo Scalzo

unread,
Feb 4, 2022, 9:02:03 AM2/4/22
to ns-3-users
Is there any news about this problem? I own a macbook air with M1, is it better that I use NS3 on Ubuntu rather than Big Sur, to avoid further problems (if ever there were)?

Tom Henderson

unread,
Feb 5, 2022, 12:12:49 PM2/5/22
to ns-3-...@googlegroups.com, Mattia Lo Scalzo
I believe that M1 macs can already be used for ns-3 and will produce the same results as on Linux.  There are two issues with failing tests, and they are being tracked here:
- https://gitlab.com/nsnam/ns-3-dev/-/issues/487 (seems to require an update to the test)
- https://gitlab.com/nsnam/ns-3-dev/-/issues/531 (TcpWestwood has a divide-by-zero issue triggered by one test)

We will make sure that the upcoming ns-3.36 release passes all tests on Mac M1 machines.

- Tom
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/068267e9-5f62-414a-8dce-94bb7bcfd742n%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages