error when running examples

2,921 views
Skip to first unread message

Fayez AlFayez

unread,
Oct 30, 2012, 11:17:17 AM10/30/12
to ns-3-...@googlegroups.com
Hello there
When I tried to run './waf --run progname'  or " ./waf --run non-existent-program-name. "

Can anybody help me out.

Thank you


./waf --run non-existent-program-name.
Waf: Entering directory `/Users/fayezalfayez/Downloads/ns-allinone-3.14.1/ns-3.14.1/build'
program 'non-existent-program-name.' not found; available programs are: ['aodv', 'src/aodv/examples/aodv', 'csma-bridge', 'src/bridge/examples/csma-bridge', 'csma-bridge-one-hop', 'src/bridge/examples/csma-bridge-one-hop', 'buildings-pathloss-profiler', 'src/buildings/examples/buildings-pathloss-profiler', 'config-store-save', 'src/config-store/examples/config-store-save', 'main-callback', 'src/core/examples/main-callback', 'sample-simulator', 'src/core/examples/sample-simulator', 'main-ptr', 'src/core/examples/main-ptr', 'main-random-variable', 'src/core/examples/main-random-variable', 'sample-random-variable', 'src/core/examples/sample-random-variable', 'csma-one-subnet', 'src/csma/examples/csma-one-subnet', 'csma-broadcast', 'src/csma/examples/csma-broadcast', 'csma-packet-socket', 'src/csma/examples/csma-packet-socket', 'csma-multicast', 'src/csma/examples/csma-multicast', 'csma-raw-ip-socket', 'src/csma/examples/csma-raw-ip-socket', 'csma-ping', 'src/csma/examples/csma-ping', 'csma-star', 'src/csma-layout/examples/csma-star', 'dsdv-manet', 'src/dsdv/examples/dsdv-manet', 'dsr', 'src/dsr/examples/dsr', 'li-ion-energy-source', 'src/energy/examples/li-ion-energy-source', 'main-simple', 'src/internet/examples/main-simple', 'lena-cqi-threshold', 'src/lte/examples/lena-cqi-threshold', 'lena-dual-stripe', 'src/lte/examples/lena-dual-stripe', 'lena-fading', 'src/lte/examples/lena-fading', 'lena-intercell-interference', 'src/lte/examples/lena-intercell-interference', 'lena-pathloss-traces', 'src/lte/examples/lena-pathloss-traces', 'lena-profiling', 'src/lte/examples/lena-profiling', 'lena-rem', 'src/lte/examples/lena-rem', 'lena-rem-sector-antenna', 'src/lte/examples/lena-rem-sector-antenna', 'lena-rlc-traces', 'src/lte/examples/lena-rlc-traces', 'lena-simple', 'src/lte/examples/lena-simple', 'lena-simple-epc', 'src/lte/examples/lena-simple-epc', 'mesh', 'src/mesh/examples/mesh', 'main-grid-topology', 'src/mobility/examples/main-grid-topology', 'main-random-topology', 'src/mobility/examples/main-random-topology', 'main-random-walk', 'src/mobility/examples/main-random-walk', 'simple-distributed', 'src/mpi/examples/simple-distributed', 'third-distributed', 'src/mpi/examples/third-distributed', 'nms-p2p-nix-distributed', 'src/mpi/examples/nms-p2p-nix-distributed', 'dumbbell-animation', 'src/netanim/examples/dumbbell-animation', 'grid-animation', 'src/netanim/examples/grid-animation', 'star-animation', 'src/netanim/examples/star-animation', 'wireless-animation', 'src/netanim/examples/wireless-animation', 'main-packet-header', 'src/network/examples/main-packet-header', 'main-packet-tag', 'src/network/examples/main-packet-tag', 'red-tests', 'src/network/examples/red-tests', 'droptail_vs_red', 'src/network/examples/droptail_vs_red', 'nix-simple', 'src/nix-vector-routing/examples/nix-simple', 'nms-p2p-nix', 'src/nix-vector-routing/examples/nms-p2p-nix', 'simple-point-to-point-olsr', 'src/olsr/examples/simple-point-to-point-olsr', 'olsr-hna', 'src/olsr/examples/olsr-hna', 'main-attribute-value', 'src/point-to-point/examples/main-attribute-value', 'main-propagation-loss', 'src/propagation/examples/main-propagation-loss', 'jakes-propagation-model-example', 'src/propagation/examples/jakes-propagation-model-example', 'adhoc-aloha-ideal-phy', 'src/spectrum/examples/adhoc-aloha-ideal-phy', 'adhoc-aloha-ideal-phy-matrix-propagation-loss-model', 'src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model', 'adhoc-aloha-ideal-phy-with-microwave-oven', 'src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven', 'gnuplot-example', 'src/tools/examples/gnuplot-example', 'topology-read', 'src/topology-read/examples/topology-read', 'uan-cw-example', 'src/uan/examples/uan-cw-example', 'uan-rc-example', 'src/uan/examples/uan-rc-example', 'virtual-net-device', 'src/virtual-net-device/examples/virtual-net-device', 'wifi-phy-test', 'src/wifi/examples/wifi-phy-test', 'wimax-ipv4', 'src/wimax/examples/wimax-ipv4', 'wimax-multicast', 'src/wimax/examples/wimax-multicast', 'wimax-simple', 'src/wimax/examples/wimax-simple', 'energy-model-example', 'examples/energy/energy-model-example', 'simple-error-model', 'examples/error-model/simple-error-model', 'icmpv6-redirect', 'examples/ipv6/icmpv6-redirect', 'ping6', 'examples/ipv6/ping6', 'radvd', 'examples/ipv6/radvd', 'radvd-two-prefix', 'examples/ipv6/radvd-two-prefix', 'test-ipv6', 'examples/ipv6/test-ipv6', 'fragmentation-ipv6', 'examples/ipv6/fragmentation-ipv6', 'loose-routing-ipv6', 'examples/ipv6/loose-routing-ipv6', 'matrix-topology', 'examples/matrix-topology/matrix-topology', 'ns2-mobility-trace', 'examples/mobility/ns2-mobility-trace', 'object-names', 'examples/naming/object-names', 'realtime-udp-echo', 'examples/realtime/realtime-udp-echo', 'dynamic-global-routing', 'examples/routing/dynamic-global-routing', 'static-routing-slash32', 'examples/routing/static-routing-slash32', 'global-routing-slash32', 'examples/routing/global-routing-slash32', 'global-injection-slash32', 'examples/routing/global-injection-slash32', 'simple-global-routing', 'examples/routing/simple-global-routing', 'simple-alternate-routing', 'examples/routing/simple-alternate-routing', 'mixed-global-routing', 'examples/routing/mixed-global-routing', 'simple-routing-ping6', 'examples/routing/simple-routing-ping6', 'manet-routing-compare', 'examples/routing/manet-routing-compare', 'socket-bound-static-routing', 'examples/socket/socket-bound-static-routing', 'socket-bound-tcp-static-routing', 'examples/socket/socket-bound-tcp-static-routing', 'wifi-example-sim', 'examples/stats/wifi-example-sim', 'tcp-large-transfer', 'examples/tcp/tcp-large-transfer', 'tcp-nsc-lfn', 'examples/tcp/tcp-nsc-lfn', 'tcp-nsc-zoo', 'examples/tcp/tcp-nsc-zoo', 'tcp-star-server', 'examples/tcp/tcp-star-server', 'star', 'examples/tcp/star', 'tcp-bulk-send', 'examples/tcp/tcp-bulk-send', 'hello-simulator', 'examples/tutorial/hello-simulator', 'first', 'examples/tutorial/first', 'second', 'examples/tutorial/second', 'third', 'examples/tutorial/third', 'fourth', 'examples/tutorial/fourth', 'fifth', 'examples/tutorial/fifth', 'sixth', 'examples/tutorial/sixth', 'udp-echo', 'examples/udp/udp-echo', 'udp-client-server', 'examples/udp-client-server/udp-client-server', 'udp-trace-client-server', 'examples/udp-client-server/udp-trace-client-server', 'mixed-wireless', 'examples/wireless/mixed-wireless', 'wifi-adhoc', 'examples/wireless/wifi-adhoc', 'wifi-clear-channel-cmu', 'examples/wireless/wifi-clear-channel-cmu', 'wifi-ap', 'examples/wireless/wifi-ap', 'wifi-wired-bridging', 'examples/wireless/wifi-wired-bridging', 'simple-wifi-frame-aggregation', 'examples/wireless/simple-wifi-frame-aggregation', 'multirate', 'examples/wireless/multirate', 'wifi-simple-adhoc', 'examples/wireless/wifi-simple-adhoc', 'wifi-simple-adhoc-grid', 'examples/wireless/wifi-simple-adhoc-grid', 'wifi-simple-infra', 'examples/wireless/wifi-simple-infra', 'wifi-simple-interference', 'examples/wireless/wifi-simple-interference', 'wifi-blockack', 'examples/wireless/wifi-blockack', 'ofdm-validation', 'examples/wireless/ofdm-validation', 'wifi-hidden-terminal', 'examples/wireless/wifi-hidden-terminal', 'scratch-simulator', 'scratch/scratch-simulator', 'subdir', 'scratch/subdir/subdir', 'test-runner', 'utils/test-runner', 'bench-simulator', 'utils/bench-simulator', 'bench-packets', 'utils/bench-packets', 'print-introspected-doxygen', 'utils/print-introspected-doxygen']

Konstantinos

unread,
Oct 30, 2012, 11:23:49 AM10/30/12
to ns-3-...@googlegroups.com
Hi Fayez,

In order to run a program/script in NS-3 you have to call it by its name.
So for example when you call

./waf --run progname 

The progname must exist within your NS-3 project.
Similar with the non-existent-program-name

So, if you don't have somewhere in your project a file/script with the name progname.cc (usually we keep script files in /scratch folder), then you can't call it.

The output you got from waf is the complete list of all the programs you have compiled, thus can run, in NS3

srinivas poram

unread,
Oct 31, 2012, 5:15:07 AM10/31/12
to ns-3-...@googlegroups.com
Hi,
the program should be there in the scratch  folder.

go to the ns-3.15 by cd Desktop/.../ns-3.15 from the terminal and then

./waf

after this run the program by

./waf --run <your-program>

srinivas poram

unread,
Jan 1, 2013, 5:51:09 AM1/1/13
to ns-3-...@googlegroups.com
Hi,
Copy any example program for ex: first.cc present in the folder "tutorial" located at ns-allinone-3.15/ns-3.15/examples. copy this program to 'scratch'  folder present in ns-allinone-3.15/ns-3.15.

 then from the command prompt go to location by typing cd Desktop/ns-allinone-3.15/ns-3.15 (in my case the folder ns-allinone-3.15 is at Desktop), then type ./waf
and the ./waf  --run <program-name>

Thanks
Srinivas

On Wednesday, 31 October 2012 15:35:28 UTC+5:30, WSNs researcher wrote:
Hello Srinivas

Would you help me to run any example please? 

Fayez

unread,
Oct 31, 2012, 6:05:28 AM10/31/12
to ns-3-...@googlegroups.com
Hello Srinivas

Would you help me to run any example please? 


On Wednesday, October 31, 2012 9:15:07 AM UTC, srinivas poram wrote:

shan yan

unread,
Nov 1, 2012, 6:35:57 AM11/1/12
to ns-3-...@googlegroups.com
Hi Fayez,
Assuming that your installation was all done properly, go to your dir ns-3-allinone/ns-3.14/examples/tutorial and then copy the first.cc. Then paste it to ns-3-allinone/ns-3.14/scratch directory. After that from the ns-3-allinone/ns-3.14/ directory, run the command ./waf --run scratch/yourprogname and hit enter. Make sure u dont put the .cc in yourprogname while running. Also substitute the correct version in the above examples ;) Hope this helps!!!
Reply all
Reply to author
Forward
0 new messages