DTN code not running in ns3

254 views
Skip to first unread message

Parikshit Saikia

unread,
Feb 16, 2014, 12:58:21 AM2/16/14
to ns-3-...@googlegroups.com


while I am trying to run dtn code in ns3 version 3.15 by
#nohup ./simulate.sh &
it is showing the following error

Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []
Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []
Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []
Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []
Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []
Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []


I am not able to find out where is dtn_sf_udp_315'

Please some one help me..
Parikshit Saikia

Tommaso Pecorella

unread,
Feb 16, 2014, 4:29:47 AM2/16/14
to ns-3-...@googlegroups.com
Hi,

here is some help: make sure to give all the details when you have a problem.

1) You're trying to use a launching program (simulate.sh), but you didn't tell what's inside this program.
2) Apparently this program (a bash one) is trying to launch a simulation named "dtn_sf_udp_315", but you didn't tell us where the sources of this program is (in scratch ?)
3) You didn't tell us if the program can be launched directly from waf.

Hence, the best advice I can give you is: be precise. Do you think that a doctor will give you the right pills just because you told him you're not feeling well ?


Cheers,

T.

Parikshit Saikia

unread,
Feb 16, 2014, 9:34:32 AM2/16/14
to ns-3-...@googlegroups.com

Hi Tommaso Pecorella

Thanks a lot in advance for giving suggestions

The simulate.sh file contains the following lines

#!/bin/bash

for i in 1 2 3 4 5 6; do
    new_seed=`expr 12345670 + 2 \* $i - 1`
    tracedir='/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/examples'
    thisdir='/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/examples/DTN_SF_UDP'
    ./waf --run "dtn_sf_udp_315 --seed=$new_seed --traceFile=$tracedir/sf_downtown_nodes116_time3600.tcl --logFile=$thisdir/ns-2.log --nodeNum=116 --duration=3600.0" > dtn.txt
    grep 'final' dtn.txt > temp.txt
    awk '{print $21" "$14" "$18" "$3" "$5}' temp.txt > bundle_delays.tr
    rm temp.txt
    grep -v 'bundle' dtn.txt|grep -v 'antipacket'|grep -v 'ing'|grep -v 'too big' > qtrace.tr
    mv *.tr dtn.txt Run$i
done


I think error is coming from the line
"/waf --run "dtn_sf_udp_315 --seed=$new_seed --traceFile=$tracedir/sf_downtown_nodes116_time3600.tcl --logFile=$thisdir/ns-2.log --nodeNum=116 --duration=3600.0" > dtn.txt"





Tommaso Pecorella

unread,
Feb 16, 2014, 9:37:06 AM2/16/14
to ns-3-...@googlegroups.com
./waf configure --enable-examples
./waf

then retry.

T.

Parikshit Saikia

unread,
Feb 16, 2014, 9:48:46 AM2/16/14
to ns-3-...@googlegroups.com

Hi Tommaso Pecorella

Thanks a lot in advance for giving suggestions

I have been trying to simulate a dtn code in ns3-15 which is downloaded from http://www.netlab.tkk.fi/tutkimus/dtn/ns/

A set of instructions are given in the documentation found in http://www.netlab.tkk.fi/tutkimus/dtn/ns/ and I am exactly doing the same.

while I am trying to run using ./simulate from the newly created directory named
ns-allinone-3.15/ns-3.15/DTN_SF_UDP (all dtn related files are in this directory and simulate.sh file is also there)
 List of files in ns-allinone-3.15/ns-3.15/DTN_SF_UDP directory
Run1....Run6, simulate.sh, waf, wscript, dtn.cc, mypacket.cc, mypacket.h etc....



The simulate.sh file contains the following lines

#!/bin/bash

for i in 1 2 3 4 5 6; do
    new_seed=`expr 12345670 + 2 \* $i - 1`
    tracedir='/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/examples'
    thisdir='/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/examples/DTN_SF_UDP'
    ./waf --run "dtn_sf_udp_315 --seed=$new_seed --traceFile=$tracedir/sf_downtown_nodes116_time3600.tcl --logFile=$thisdir/ns-2.log --nodeNum=116 --duration=3600.0" > dtn.txt
    grep 'final' dtn.txt > temp.txt
    awk '{print $21" "$14" "$18" "$3" "$5}' temp.txt > bundle_delays.tr
    rm temp.txt
    grep -v 'bundle' dtn.txt|grep -v 'antipacket'|grep -v 'ing'|grep -v 'too big' > qtrace.tr
    mv *.tr dtn.txt Run$i
done


I think error is coming from the line
"/waf --run "dtn_sf_udp_315 --seed=$new_seed --traceFile=$tracedir/sf_downtown_nodes116_time3600.tcl --logFile=$thisdir/ns-2.log --nodeNum=116 --duration=3600.0" > dtn.txt"

showing error is
Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
program 'dtn_sf_udp_315' not found; available programs are: []

please help me.




Parikshit Saikia

unread,
Feb 16, 2014, 10:33:01 AM2/16/14
to ns-3-...@googlegroups.com

Hi,
Tommaso Pecorella

After doing

./waf configure --enable-examples
./waf

and then running
./simulate.sh

the following error is showing

Waf: Entering directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
[298/308] cxx: dtn.cc -> ../../build/examples/DTN_SF_UDP/dtn.cc.1.o
cc1plus: warnings being treated as errors
../examples/DTN_SF_UDP/dtn.cc: In constructor ‘DtnApp::DtnApp()’:
../examples/DTN_SF_UDP/dtn.cc:142:10: error: passing NULL to non-pointer argument 1 of ‘std::vector<_Tp, _Alloc>::vector(std::vector::size_type, const value_type&, const allocator_type&) [with _Tp = ns3::Ptr<ns3::Packet>, _Alloc = std::allocator<ns3::Ptr<ns3::Packet> >, std::vector::size_type = unsigned int, value_type = ns3::Ptr<ns3::Packet>, allocator_type = std::allocator<ns3::Ptr<ns3::Packet> >]’
../examples/DTN_SF_UDP/dtn.cc:142:10: error: passing NULL to non-pointer argument 1 of ‘std::vector<_Tp, _Alloc>::vector(std::vector::size_type, const value_type&, const allocator_type&) [with _Tp = ns3::Ptr<ns3::Packet>, _Alloc = std::allocator<ns3::Ptr<ns3::Packet> >, std::vector::size_type = unsigned int, value_type = ns3::Ptr<ns3::Packet>, allocator_type = std::allocator<ns3::Ptr<ns3::Packet> >]’
Waf: Leaving directory `/home/parikshit/Desktop/ns-allinone-3.15/ns-3.15/build'
Build failed
 -> task in 'dtn_sf_udp_315' failed (exit status 1):
    {task 143722284: cxx dtn.cc -> dtn.cc.1.o}
['/usr/lib/ccache/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-Ibuild', '-I.', '-I.', '-I/home/parikshit/Desktop/ns-allinone-3.15', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_PACKET_H=1', '-DHAVE_DL=1', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DENABLE_GSL', '../examples/DTN_SF_UDP/dtn.cc', '-c', '-o', 'examples/DTN_SF_UDP/dtn.cc.1.o']

 

Tommaso Pecorella

unread,
Feb 16, 2014, 11:08:16 AM2/16/14
to ns-3-...@googlegroups.com
Hi,

learn your own compiler, please.

The code is old. The compiler is new. Unless you use 3.19 there is NO support on fixing those things. The best you can do is to disable the -Werror flag (I don't know exactly how since it's platform-dependent). Then the warnings will not cause break the compilation and you'll be able to cross your fingers.

T.
Reply all
Reply to author
Forward
0 new messages