[ndnSIM] Question about visualization and output

李怿曈 Yitong LI yitongli at hkust-gz.edu.cn
Wed Apr 10 20:21:19 PDT 2024


I’ve tried it again. It seems nothing has changed. I’ve attached the entire log file except for the intermediate process of ./waf building process as it’s too long. May I ask if there’s any wrong operation?

Caster

2024年4月11日 上午1:43,Sirapop Theeranantachai <sirapop741 at gmail.com> 写道:

Can you try again with a fresh directory?
https://ndnsim.net/current/best-practices.html
Otherwise, I ran out of ideas, unfortunately.

On Tue, Apr 9, 2024 at 11:21 PM 李怿曈 Yitong LI <yitongli at hkust-gz.edu.cn<mailto:yitongli at hkust-gz.edu.cn>> wrote:
I’ve configured them in the following steps.
1. ./waf configure -d optimized
2. ./waf
3. NS_LOG=ndn.Producer:ndn.Consumer ./waf --run grid3

Do you think there’s any mistake with them? As according to the documentation, it says using ./waf configure -d optimized can make ndnSIM in debug mode.

Thanks,
Caster

2024年4月10日 上午2:11,Sirapop Theeranantachai <sirapop741 at gmail.com<mailto:sirapop741 at gmail.com>> 写道:

Question 1:
Yes, you don't really need to visualize to get any result. You can obtain metrics using these helper functions.
https://ndnsim.net/2.2/metric.html

Question 2:
Seems like the ns-3 or ndnsim is compiled without the debug mode. Can you make sure everything is compiled with debugging enabled?

On Tue, Apr 9, 2024, 12:14 AM 李怿曈 Yitong LI <yitongli at hkust-gz.edu.cn<mailto:yitongli at hkust-gz.edu.cn>> wrote:
Hi all,

I’ve sent another question earlier, I just pasted it here with another relevant question regarding ndnSIM’s output.

1. What's the difference between running using "--visualize" or not. As the simulation can be started when activating visualization, what will happen if not using "—visualize”. I think that it should be possible to run the simulation and see the output report even without “—visualize” option?

2. As there’s problem with kiwi, I tried using ndnSim without “—visualize” and added NS_LOG to see outputs on cmd. However, it gave me nothing when using “NS_LOG=ndn.Producer:ndn.Consumer”, I’ve added testing print info in my program, it seems everything is fine. May I ask what’s the potential reason for this? I’ve attached log and source file below. My problem is that I can’t see the log outputs now.

caster at ubuntu:~/ndnSim/ns-3$ NS_LOG=ndn.Producer:ndn.Consumer ./waf --run grid3
Waf: Entering directory `/home/caster/ndnSim/ns-3/build'
[2810/2875] Compiling scratch/grid3.cc<http://grid3.cc/>
[2833/2875] Linking build/scratch/grid3
Waf: Leaving directory `/home/caster/ndnSim/ns-3/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (40.240s)
Set default parameters for link and channels
create topology
install ndn stack
install global routing interface
get pointers of nodes
define name prefix
install different strategi for different prefix
install consumer app
install producer app
calculate FIB

Thanks,
Caster
_______________________________________________
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu<mailto:ndnSIM at lists.cs.ucla.edu>
https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20240411/bbfc884d/attachment-0001.htm>
-------------- next part --------------
caster at ubuntu:~$ mkdir ndnSIM-new
caster at ubuntu:~$ cd ndnSIM-new/
caster at ubuntu:~/ndnSIM-new$ git clone https://github.com/named-data-ndnSIM/ns-3-dev.git ns-3
Cloning into 'ns-3'...
remote: Enumerating objects: 171384, done.
remote: Counting objects: 100% (46613/46613), done.
remote: Compressing objects: 100% (2290/2290), done.
remote: Total 171384 (delta 44561), reused 44323 (delta 44323), pack-reused 124771
Receiving objects: 100% (171384/171384), 126.18 MiB | 4.12 MiB/s, done.
Resolving deltas: 100% (136462/136462), done.
Updating files: 100% (3765/3765), done.
caster at ubuntu:~/ndnSIM-new$ git clone https://github.com/named-data-ndnSIM/pybindgen.git pybindgen
Cloning into 'pybindgen'...
remote: Enumerating objects: 6271, done.
remote: Counting objects: 100% (118/118), done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 6271 (delta 58), reused 61 (delta 27), pack-reused 6153
Receiving objects: 100% (6271/6271), 11.32 MiB | 4.48 MiB/s, done.
Resolving deltas: 100% (4268/4268), done.
caster at ubuntu:~/ndnSIM-new$ git clone --recursive https://github.com/named-data-ndnSIM/ndnSIM.git ns-3/src/ndnSIM
Cloning into 'ns-3/src/ndnSIM'...
remote: Enumerating objects: 15899, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 15899 (delta 22), reused 71 (delta 21), pack-reused 15822
Receiving objects: 100% (15899/15899), 8.87 MiB | 3.77 MiB/s, done.
Resolving deltas: 100% (9975/9975), done.
Submodule 'NFD' (https://github.com/named-data-ndnSIM/NFD) registered for path 'NFD'
Submodule 'ndn-cxx' (https://github.com/named-data-ndnSIM/ndn-cxx) registered for path 'ndn-cxx'
Cloning into '/home/caster/ndnSIM-new/ns-3/src/ndnSIM/NFD'...
remote: Enumerating objects: 18463, done.        
remote: Counting objects: 100% (811/811), done.        
remote: Compressing objects: 100% (285/285), done.        
remote: Total 18463 (delta 528), reused 665 (delta 521), pack-reused 17652        
Receiving objects: 100% (18463/18463), 8.09 MiB | 4.44 MiB/s, done.
Resolving deltas: 100% (14429/14429), done.
Cloning into '/home/caster/ndnSIM-new/ns-3/src/ndnSIM/ndn-cxx'...
remote: Enumerating objects: 31679, done.        
remote: Counting objects: 100% (4145/4145), done.        
remote: Compressing objects: 100% (580/580), done.        
remote: Total 31679 (delta 3739), reused 3565 (delta 3565), pack-reused 27534        
Receiving objects: 100% (31679/31679), 9.89 MiB | 3.48 MiB/s, done.
Resolving deltas: 100% (25364/25364), done.
Submodule path 'NFD': checked out '361b381b9b552ff3341aa160858bea1d470d2122'
Submodule 'websocketpp' (https://github.com/cawka/websocketpp.git) registered for path 'NFD/websocketpp'
Cloning into '/home/caster/ndnSIM-new/ns-3/src/ndnSIM/NFD/websocketpp'...
remote: Enumerating objects: 12253, done.        
remote: Counting objects: 100% (1514/1514), done.        
remote: Compressing objects: 100% (200/200), done.        
remote: Total 12253 (delta 1479), reused 1314 (delta 1314), pack-reused 10739        
Receiving objects: 100% (12253/12253), 8.25 MiB | 4.58 MiB/s, done.
Resolving deltas: 100% (7582/7582), done.
Submodule path 'NFD/websocketpp': checked out 'ac4e021333675fc80b96eb7be45d218581c897e2'
Submodule path 'ndn-cxx': checked out '2b51e5796415b5d41fe268b35250b9453f16d3d6'
caster at ubuntu:~/ndnSIM-new$ cd ns-3/
caster at ubuntu:~/ndnSIM-new/ns-3$ ./waf configure -d optimized
Setting top to                           : /home/caster/ndnSIM-new/ns-3 
Setting out to                           : /home/caster/ndnSIM-new/ns-3/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for cc version                  : 9.4.0 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking supported compiler CXXFLAGS     : -std=c++17 
Checking supported optimizations CXXFLAGS : -O3 
Checking supported debug CXXFLAGS         : -g 
Checking supported warnings CXXFLAGS      : -Wall -Wno-error=deprecated-declarations -fstrict-aliasing -Wstrict-aliasing 
Checking for compilation flag -march=native support : ok 
Checking for compilation flag -Wl,--soname=foo support : ok 
Checking for compilation flag -std=c++17 support       : ok 
Checking boost includes                                : 1_71 /usr/include 
Checking boost libs                                    : ok /usr/lib/x86_64-linux-gnu 
Checking for boost linkage                             : ok 
Checking for program 'python'                          : /usr/bin/python3 
Checking for python version >= 2.3                     : 3.8.10 
python-config                                          : /usr/bin/python3-config 
Asking python-config for pyembed '--cflags --libs --ldflags --embed' flags : yes 
Testing pyembed configuration                                              : yes 
Asking python-config for pyext '--cflags --libs --ldflags' flags           : yes 
Testing pyext configuration                                                : yes 
Checking for compilation flag -fvisibility=hidden support                  : ok 
Checking for compilation flag -Wno-array-bounds support                    : ok 
Checking for pybindgen location                                            : ../pybindgen (guessed) 
Checking for python module 'pybindgen'                                     : ok 
/home/caster/ndnSIM-new/pybindgen/.eggs/setuptools_scm-8.0.4-py3.8.egg/setuptools_scm/_integration/setuptools.py:30: RuntimeWarning: 
ERROR: setuptools==45.2.0 is used in combination with setuptools_scm>=8.x

Your build configuration is incomplete and previously worked by accident!
setuptools_scm requires setuptools>=61

Suggested workaround if applicable:
 - migrating from the deprecated setup_requires mechanism to pep517/518
   and using a pyproject.toml to declare build dependencies
   which are reliably pre-installed before running the build tools

  warnings.warn(
WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
Checking for pybindgen version                                             : 0.22.1.post1+ga619e22 
Checking for code snippet                                                  : yes 
Checking for types uint64_t and unsigned long equivalence                  : no 
Checking for code snippet                                                  : no 
Checking for types uint64_t and unsigned long long equivalence             : yes 
Checking for the apidefs that can be used for Python bindings              : gcc-LP64 
Checking for internal GCC cxxabi                                           : complete 
Checking for python module 'pygccxml'                                      : 2.4.0 
Checking for pygccxml version                                              : 2.4.0 
Checking for program 'castxml'                                             : /usr/bin/castxml 
Checking for castxml version                                               : 0.2 
Checking for click location                                                : not found 
Checking for program 'pkg-config'                                          : /usr/bin/pkg-config 
Checking for 'gtk+-3.0 >= 3.22'                                            : yes 
Checking for 'libxml-2.0 >= 2.7'                                           : yes 
/home/caster/ndnSIM-new/ns-3/waf-tools/versioning.py:40: DeprecationWarning: invalid escape sequence \d
  matches = re.match("ns-(\d+)\.(\d+)(?:.(\d+))?(?:-(RC.+))?.*", safe_tag)
/home/caster/ndnSIM-new/ns-3/waf-tools/versioning.py:112: DeprecationWarning: invalid escape sequence \d
  matches = re.match('(.+)-(\d+)-(g[a-fA-F0-9]+)(?:-(dirty))?', out)
checking for uint128_t                                                     : not found 
checking for __uint128_t                                                   : yes 
Checking high precision implementation                                     : 128-bit integer (default) 
Checking for header stdint.h                                               : yes 
Checking for header inttypes.h                                             : yes 
Checking for header sys/inttypes.h                                         : not found 
Checking for header sys/types.h                                            : yes 
Checking for header sys/stat.h                                             : yes 
Checking for header dirent.h                                               : yes 
Checking for header signal.h                                               : yes 
Checking for header pthread.h                                              : yes 
Checking for header stdint.h                                               : yes 
Checking for header inttypes.h                                             : yes 
Checking for header sys/inttypes.h                                         : not found 
Checking for library rt                                                    : yes 
Checking for header sys/ioctl.h                                            : yes 
Checking for header net/if.h                                               : yes 
Checking for header net/ethernet.h                                         : yes 
Checking for 'libdpdk'                                                     : yes 
Checking for header linux/if_tun.h                                         : yes 
Checking for header netpacket/packet.h                                     : yes 
Checking for header net/netmap_user.h                                      : not found 
Checking for NSC location                                                  : not found 
Checking for program 'doxygen'                                             : /usr/bin/doxygen 
Checking for program 'tar'                                                 : /usr/bin/tar 
Checking for program 'sphinx-build'                                        : /usr/bin/sphinx-build 
Checking for std::to_string                                                : yes 
Checking for library pthread                                               : yes 
Checking for 'sqlite3'                                                     : yes 
Checking for OpenSSL version                                               : OpenSSL 1.1.1f  31 Mar 2020 
Checking if OpenSSL library works                                          : yes 
Checking for OpenFlow location                                             : not found 
Checking for 'sqlite3'                                                     : yes 
Checking for header semaphore.h                                            : yes 
Checking for header linux/if_tun.h                                         : yes 
Checking for python module 'gi'                                            : 3.36.0 
Checking for python module 'gi.repository.GObject'                         : ok 
Checking for python module 'cairo'                                         : ok 
Checking for python module 'pygraphviz'                                    : 1.5 
Checking for python module 'gi.repository.Gtk'                             : ok 
Checking for python module 'gi.repository.Gdk'                             : ok 
Checking for python module 'gi.repository.Pango'                           : ok 
Checking for python module 'gi.repository.GooCanvas'                       : ok 
Checking for program 'sudo'                                                : /usr/bin/sudo 
Checking for program 'valgrind'                                            : /usr/bin/valgrind 
Checking for 'gsl'                                                         : yes 
libgcrypt-config                                                           : /usr/bin/libgcrypt-config 
Checking for libgcrypt                                                     : yes 
Checking for program 'doxygen'                                             : /usr/bin/doxygen 
---- Summary of optional NS-3 features:
Build profile                 : optimized
Build directory               : 
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
DES Metrics event collection  : not enabled (defaults to disabled)
DPDK NetDevice                : enabled
Emulation FdNetDevice         : enabled
Examples                      : not enabled (defaults to disabled)
File descriptor NetDevice     : enabled
GNU Scientific Library (GSL)  : enabled
Gcrypt library                : enabled
GtkConfigStore                : enabled
MPI Support                   : not enabled (option --enable-mpi not selected)
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
NS-3 OpenFlow Integration     : not enabled (OpenFlow not enabled (see option --with-openflow))
Netmap emulation FdNetDevice  : not enabled (needs net/netmap_user.h)
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
PyViz visualizer              : enabled
Python API Scanning Support   : enabled
Python Bindings               : enabled
Real Time Simulator           : enabled
SQLite stats support          : enabled
Tap Bridge                    : enabled
Tap FdNetDevice               : enabled
Tests                         : not enabled (defaults to disabled)
Threading Primitives          : enabled
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
XmlIo                         : enabled
ndnSIM                        : enabled
'configure' finished successfully (1m30.565s)
caster at ubuntu:~/ndnSIM-new/ns-3$ ./waf
Waf: Entering directory `/home/caster/ndnSIM-new/ns-3/build'

Waf: Leaving directory `/home/caster/ndnSIM-new/ns-3/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (1h21m53.296s)

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                  ndnSIM
netanim                   network                   nix-vector-routing
olsr                      point-to-point            point-to-point-layout
propagation               sixlowpan                 spectrum
stats                     tap-bridge                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                     mpi
openflow

caster at ubuntu:~/ndnSIM-new/ns-3$ ls
AUTHORS       CONTRIBUTING.md  __pycache__    test.py       waf
bindings      doc              README.md      testpy.supp   waf.bat
build         examples         RELEASE_NOTES  utils         waf-tools
CHANGES.html  LICENSE          scratch        utils.py      wscript
contrib       Makefile         src            VERSION.info  wutils.py
caster at ubuntu:~/ndnSIM-new/ns-3$ cd scratch/
caster at ubuntu:~/ndnSIM-new/ns-3/scratch$ ls
scratch-simulator.cc  subdir
caster at ubuntu:~/ndnSIM-new/ns-3/scratch$ vim scratch-simulator.cc 
caster at ubuntu:~/ndnSIM-new/ns-3/scratch$ cd ..
caster at ubuntu:~/ndnSIM-new/ns-3$ cd ..
caster at ubuntu:~/ndnSIM-new$ cd ..
caster at ubuntu:~$ cd ndn
ndn-nlsr/   ndnSim/     ndnSIM-new/ 
caster at ubuntu:~$ cd ndnSIM
bash: cd: ndnSIM: No such file or directory
caster at ubuntu:~$ ls
Desktop    Downloads  ndn-nlsr  ndnSIM-new  Public     Videos
Documents  Music      ndnSim    Pictures    Templates
caster at ubuntu:~$ cd ndnSim/
caster at ubuntu:~/ndnSim$ cd ns-3/
caster at ubuntu:~/ndnSim/ns-3$ cd scratch/
caster at ubuntu:~/ndnSim/ns-3/scratch$ ls
grid3.cc      ndn-random.cc           scratch-simulator.cc  test-bottleneck.cc
ndn-first.cc  ndnSIM-bottleneck-6.cc  subdir
caster at ubuntu:~/ndnSim/ns-3/scratch$ ls
grid3.cc      ndn-random.cc           scratch-simulator.cc  test-bottleneck.cc
ndn-first.cc  ndnSIM-bottleneck-6.cc  subdir
caster at ubuntu:~/ndnSim/ns-3/scratch$ sudo cp grid3.cc /home/caster/ndnSIM-new/ns-3/scratch/
[sudo] password for caster: 
caster at ubuntu:~/ndnSim/ns-3/scratch$ cd ..
caster at ubuntu:~/ndnSim/ns-3$ cd ..
caster at ubuntu:~/ndnSim$ cd ..
caster at ubuntu:~$ cd ndnSIM-new/
caster at ubuntu:~/ndnSIM-new$ cd ns-3/
caster at ubuntu:~/ndnSIM-new/ns-3$ NS_LOG=ndn.Producer:ndn.Consumer ./waf --run grid3
Waf: Entering directory `/home/caster/ndnSIM-new/ns-3/build'
[2780/2862] Compiling scratch/grid3.cc
[2821/2862] Linking build/scratch/grid3
Waf: Leaving directory `/home/caster/ndnSIM-new/ns-3/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (56.298s)
Set default parameters for link and channels
create topology
install ndn stack
install global routing interface
get pointers of nodes
define name prefix
install different strategy for different prefix
install consumer app
install producer app
calculate FIB
caster at ubuntu:~/ndnSIM-new/ns-3$ 




More information about the ndnSIM mailing list