Error "Couldn't find the specified program" due to CMakelist.txt?

246 views
Skip to first unread message

Leon Chen

unread,
Apr 7, 2024, 3:37:55 PM4/7/24
to ns-3-users

Dear all,

I am using NR extension and ns3.40, created a new file by copying an example file nr/examples/cttc-nr-multi-flow-qos-sched.cc to the same folder nr/examples/cttc-nr-multi-flow-qos-sched_2.cc and the only difference between the two files are the file name and the simulation start time (a delay of 100ms in the code).

I updated the CMakefile.txt to include the new source file
set(base_examples
    cttc-3gpp-channel-example
    ...
    traffic-generator-example
    cttc-nr-simple-qos-sched
    cttc-nr-multi-flow-qos-sched
    cttc-nr-multi-flow-qos-sched_2
)

It was good to run cttc-nr-multi-flow-qos-sched. But for the new file, I got the error:
./ns3 run nr/examples/cttc-nr-multi-flow-qos-sched_2.cc
Traceback (most recent call last):
  File "./ns3", line 1622, in <module>
    main()
  File "./ns3", line 1582, in main
    raise Exception("Couldn't find the specified program: %s" % target_to_run)
Exception: Couldn't find the specified program: nr/examples/cttc-nr-multi-flow-qos-sched_2.cc

I didn't see such problem in scratch - there I even did not need to modify CMakefile.txt.

What do I need to do to fix the error?

Thanks.
Leon

Gabriel Ferreira

unread,
Apr 8, 2024, 10:25:21 AM4/8/24
to ns-3-users
./ns3 configure

Leon Chen

unread,
Apr 9, 2024, 2:44:47 AM4/9/24
to ns-3-users
Thanks. I tried but it didn't change anything. Here is the output:

./ns3 build nr/examples/cttc-nr-multi-flow-qos-sched
[omitted]
-- Build files have been written to: /home/lchen/ns3_workspace/ns3_NR/ns-3-dev/cmake-cache
[0/2] Re-checking globbed directories...
ninja: no work to do.
Finished executing the following commands:
cd cmake-cache; /usr/bin/cmake --build . -j 3 --target cttc-nr-multi-flow-qos-sched ; cd ..

Running the simulation gave the same result obtained before modifying the code.

Gabriel Ferreira

unread,
Apr 9, 2024, 5:18:11 AM4/9/24
to ns-3-users
>   I tried but it didn't change anything. 

I don't know if did, because your logs show the original example being built.


>  Running the simulation gave the same result obtained before modifying the code

Because you ran the original example?

./ns3 run cttc-nr-multi-flow-qos-sched
vs
./ns3 run cttc-nr-multi-flow-qos-sched_2

Leon Chen

unread,
Apr 12, 2024, 4:00:22 PM4/12/24
to ns-3-users
Thanks Gabriel. Good catch! Yes,  my previous post was for the original example cttc-nr-multi-flow-qos-sched with changes to the values of some parameters. The statistics out of the simulation should be very different but stayed the same. In fact, the .o file below wasn't even updated and showed last updated on April 7 -- a few days ago.

     ./cmake-cache/contrib/nr/examples/CMakeFiles/cttc-nr-multi-flow-qos-sched.dir/cttc-nr-multi-flow-qos-sched.cc.o

I did try the command you suggested ./ns3 configure on the file with file name changed ns3 run cttc-nr-multi-flow-qos-sched_2, and I got the same error as before.

Please let me know if you have other suggestions.

Thanks.

Gabriel Ferreira

unread,
Apr 12, 2024, 4:04:54 PM4/12/24
to ns-3-users
What is the output for "./ns3 show targets"?

Leon Chen

unread,
Apr 12, 2024, 5:41:55 PM4/12/24
to ns-3-users
Thanks Gabriel for your prompt response!

cttc-nr-multi-flow-qos-sched is in the output of "./ns3 show targets", but cttc-nr-multi-flow-qos-sched_2 is not.

Complete output (with some omissions):

Buildable targets:
antenna                       antenna-test
[... omitted]
wimax                         wimax-test


Runnable/Buildable targets:
adaptive-red-tests            adhoc-aloha-ideal-phy
aodv                          assert-example
basic-energy-model-test       bench-packets
bench-scheduler               bit-serializer
bonnmotion-ns2-example        buildings-pathloss-profiler
cobalt-vs-codel               codel-vs-pfifo-asymmetric
codel-vs-pfifo-basic-test     colors-link-description
command-line-example          config-store-save
csma-bridge                   csma-bridge-one-hop
csma-broadcast                csma-multicast
csma-one-subnet               csma-packet-socket
csma-ping                     csma-raw-ip-socket
csma-star                     cttc-3gpp-channel-example
cttc-3gpp-channel-nums        cttc-3gpp-channel-nums-fdm
cttc-3gpp-channel-simple-fdm  cttc-3gpp-channel-simple-ran
cttc-3gpp-indoor-calibration  cttc-channel-randomness
cttc-error-model              cttc-error-model-comparison
cttc-fh-compression           cttc-lte-ca-demo
cttc-nr-3gpp-calibration-user cttc-nr-cc-bwp-demo
cttc-nr-demo                  cttc-nr-mimo-demo
cttc-nr-multi-flow-qos-sched  cttc-nr-notching
cttc-nr-simple-qos-sched      cttc-nr-traffic-3gpp-xr
cttc-nr-traffic-ngmn-mixed    cttc-realistic-beamforming
dctcp-example                 dhcp-example
double-probe-example          dsdv-manet
dsr                           dumbbell-animation
dummy-network                 dynamic-global-routing
[... omitted ...]
hello-simulator               icmpv6-redirect
lena-cc-helper                lena-cqi-threshold
lena-deactivate-bearer        lena-distributed-ffr
lena-dual-stripe              lena-fading
lena-frequency-reuse          lena-intercell-interference
lena-ipv6-addr-conf           lena-ipv6-ue-rh
lena-ipv6-ue-ue               lena-lte-comparison-campaign
lena-lte-comparison-user      lena-pathloss-traces
lena-profiling                lena-radio-link-failure
lena-rem                      lena-rem-sector-antenna
lena-rlc-traces               lena-simple
lena-simple-epc               lena-simple-epc-backhaul
lena-simple-epc-emu           lena-uplink-power-control
lena-x2-handover              lena-x2-handover-measures
[... omitted ...]
wifi-spectrum-per-interference
wifi-spectrum-saturation-example

Gabriel Ferreira

unread,
Apr 12, 2024, 5:49:49 PM4/12/24
to ns-3-users
Weird. Try replacing the _2 with -2 and reconfigure.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages