wn-upf / Komondor

Komondor Wireless Networks Simulator
GNU General Public License v3.0
65 stars 19 forks source link

Segmentation fault - validation results #123

Closed zubow closed 5 years ago

zubow commented 5 years ago

Hi,

I am not able to reproduce the validation results. Here I receive a segmentation fault - s.b. Can you help?

foo@bar:/lhome/foo/Komondor/Documentation/Validation/high-density/Komondor/input$ gdb --args ../../../../../Code/main/komondor_main system/input_system_conf.csv nodes/input_nodes_01.csv 10 10 GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ../../../../../Code/main/komondor_main...done. (gdb) r Starting program: /lhome/foo/Komondor/Code/main/komondor_main system/input_system_conf.csv nodes/input_nodes_01.csv 10 10 PARTIAL configuration entered per console. Some parameters are set by DEFAULT. Komondor input configuration:

Program received signal SIGSEGV, Segmentation fault. _IO_vfprintf_internal (s=0x0, format=0x5555555922c8 "%s KOMONDOR SIMULATION '%s' (seed %d)", ap=ap@entry=0x7fffffffdea0) at vfprintf.c:1283 1283 vfprintf.c: No such file or directory. (gdb) bt

0 _IO_vfprintf_internal (s=0x0, format=0x5555555922c8 "%s KOMONDOR SIMULATION '%s' (seed %d)", ap=ap@entry=0x7fffffffdea0) at vfprintf.c:1283

1 0x00007ffff7109e54 in __fprintf (stream=, format=) at fprintf.c:32

2 0x0000555555565792 in compcxx_Komondor_25::Setup (this=0x7fffffffe3b0, sim_time_console=10, save_system_logs_console=0, save_node_logs_console=0, save_agent_logs_console=-146207696, print_system_logs_console=1,

print_node_logs_console=1, print_agent_logs_console=0, system_input_filename=0x7fffffffe99a "system/input_system_conf.csv", nodes_input_filename_console=0x7fffffffe9b7 "nodes/input_nodes_01.csv",
script_output_filename=0x5555557b80b0 "./output/script_output", simulation_code_console=0x7fffffffe300 "DEFAULT_SIM", seed_console=10, agents_enabled_console=0,
agents_input_filename_console=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at komondor_main.cc:262

3 0x000055555556f0e1 in main (argc=5, argv=0x7fffffffe708) at komondor_main.cc:1961

(gdb)

fwilhelmi commented 5 years ago

Hi @zubow !

In order to reproduce the validation results, you just have to run the regressions script by going to ../Komondor/Code/input and type "./script_regression_validation_scenarios.sh".

Before doing this, you must ensure that the "simulation_index" variable (line 571 of komondor_main.cc) is set to "10". We are currently working on a better way to introduce inputs to the simulator, but at this moment should be done like this.

After running the validation script, you will obtain an output telling you whether the results were successful or not, for each of the scenarios introduced in the Wireless Days paper. Notice that such a script uses the necessary input files, which are also in the "input" folder.

I hope that helps you! Best regards, Francesc.

zubow commented 5 years ago

Dear Francesc,

thank you for your quick reply. I understand the validation scripts. But why I am not able to run the simple examples given in your documentation - ch. 3.4.1?

If I run: ./komondor_main ../input/input_example/input_system_conf.csv ../input/input_example/input_nodes.csv 60 789 I get a segmentation fault. Calling: ./komondor_main ../input/input_example/input_system_conf.csv ../input/input_example/input_nodes.csv 1 1 1 1 60 789 is not accepted. Can you tell me the correct way to pass the arguments?

Best, Tolja

fwilhelmi commented 5 years ago

Hi again @zubow ,

in order to make a simple simulation you have to follow these steps:

STEP 0: Set permissions to the folder (this is done only the first time) $ chmod -R 777

STEP 1: Build the project (you need to be in folder "Komondor/Code/main") $ ./build_local

STEP 2: Run Komondor simulator for the given input information (also in "Komondor/Code/main) $ ./komondor_main INPUT_FILE_SYSTEM_CONFIGURATION INPUT_FILE_NODES OUTPUT_FILE_LOGS FLAG_SAVE_SYSTEM_LOGS FLAG_SAVE_NODE_LOGS FLAG_PRINT_SYSTEM_LOGS FLAG_PRINT_NODE_LOGS SIM_TIME SEED

Notice that in your console input you forgot to specify the "output" location. An correct example for the simple simulation would be: ./komondor_main ../input/input_example/input_system_conf.csv ../input/input_example/input_nodes.csv ../output/output_text.txt 1 1 1 1 60 789

Finally, regarding the partial input, I recommend you not to use it, since it became deprecated and we will remove it in further releases.

Best regards, Francesc.

zubow commented 5 years ago

Now I understand. Regarding my example I had to add one more "1":

./komondor_main ../input/input_example/input_system_conf.csv ../input/input_example/input_nodes.csv ../output/output_text.txt 1 1 1 1 1 60 789

Thank you.

avik1991 commented 4 years ago

`nazi@nazi-ThinkPad-E460:~/NS3 Workshop/Komondor-3.0/Code/main$ ./komondor_main ../input/input_example/input_system_conf.csv ../input/input_example/input_nodes.csv ../output/output_text.txt 1 1 1 1 1 60 789 FULL configuration entered per console (NO AGENTS). Komondor input configuration:

Still same issue