mizi Posted January 28, 2019 Report Share Posted January 28, 2019 I am using network simulator Nirgam 2.1.. It is based sysytemc2.1... Whenever I write an algorithm in it no ".so files" are created for them. I just get the result for the same one algorithm that is inbuilt in it. Can I know reason for this and also how to rectify this problem.. Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted January 28, 2019 Report Share Posted January 28, 2019 Hello @mizi, Can you provide a minimal sample code and the environment details to reproduce the issue? With the current information it is very difficult to provide a solution/suggestion. Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
mizi Posted January 28, 2019 Author Report Share Posted January 28, 2019 Dear Sir, Greetings.... I am attaching a code below which I need to run in nirgam ....It is a .cpp file, when I run a make command it should run the algorithm and .so file should be created. But as I run it, it does not show any error but no .so file is created nor does the algorithm run. It runs a default algorithm at the backend whose .so file is already created. I don't understand why this happens.??? Regards Misbah Manzoor Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted January 29, 2019 Report Share Posted January 29, 2019 Hello @mizi, Though I am not familiar with the Nirgam Simulator. But can you provide the answers to the following queries: Did you add your dependencies in the Makefiles/Build scripts? My next guess would be did you look into any documentation available for the simulator? Like running the simulation with various different configurations. Does it use command line options or config files or both? Even after changing those configuration files/command line options are you able to observe any change in simulation behavior? If the answer to the above query is no then you would probably need to get your hands dirty to understand the internals, and possibly modify the existing implementation to suite your needs. Hope this helps in someway. Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
mizi Posted January 30, 2019 Author Report Share Posted January 30, 2019 Dear Sir, Greetings... Answering your questions: 1.. Yes i did add dependencies in Makefiles 2.. I looked into documentation and followed same procedure for running different algorithms 3.. It uses both command line and config files 4.. After changing config files all the parameters change except routing algorithm.. It still takes default XY algorithm even if i change the routing algorithm. Then what I observed was that XY algorithm .so file gets created, but when i run Other algorithms it runs XY algorithm by default and no .so file is created. I can't understand the fact why this happens????? Regards Mizi Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted February 3, 2019 Report Share Posted February 3, 2019 Hello @mizi, You probably missed out on this: On 1/29/2019 at 10:35 PM, AmeyaVS said: If the answer to the above query is no then you would probably need to get your hands dirty to understand the internals, and possibly modify the existing implementation to suite your needs. After taking a cursory look at the sources found following references: core/Controllers.cpp line 44: RT_ALGO: a global variable to the routing algorithm( 😞 ) Which has been initialized in config/default.h line 35 to a default value of XY. It seems you might need to integrate your algorithm following their design principles, which you can look into the existing classes of routing algorithm to figure out what all API's your algorithm need to provide to be compliant with the infrastructure. Hope this little insight helps. Best Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
mizi Posted February 6, 2019 Author Report Share Posted February 6, 2019 Dear Sir, Greetings.... I looked into your suggestion but things are not working out. Actually I think there may be some problem in make.defs file while giving suffixes. The routing algorithms are not getting compiled as ".o files" are also not getting created while running different algos. It now shows following message provided in the attachment below. How can i solve this problem, need help in this regard Quote Link to comment Share on other sites More sharing options...
AmeyaVS Posted February 7, 2019 Report Share Posted February 7, 2019 Hello @mizi, Change the following lines in Makefile.defs: (lines 33 to 36) // From application/lib/%.so : application/src/%.o $(CC) -shared -W1,-soname,$@ -o $@ $< router/lib/%.so : router/src/%.o $(CC) -shared -W1,-soname,$@ -o $@ $< // To these lines: application/lib/%.so : application/src/%.o $(CC) -shared -Wl,-soname,$@ -o $@ $< router/lib/%.so : router/src/%.o $(CC) -shared -Wl,-soname,$@ -o $@ $< Notice the subtle difference between the command line parameter: -Wl (i.e. letter l not the number 1). Hope this helps. Regards, Ameya Vikram Singh Quote Link to comment Share on other sites More sharing options...
mizi Posted February 20, 2019 Author Report Share Posted February 20, 2019 Dear Sir, Greetings... These lines are same in Makefile.defs but i still cant resolve the problem. Regards Quote Link to comment Share on other sites More sharing options...
mizi Posted February 23, 2019 Author Report Share Posted February 23, 2019 On 2/20/2019 at 12:29 PM, mizi said: Dear Sir, Greetings... Actually systemc is not working properly which causes trouble in nirgam. I tried instally systemc 2.3.1 on ubuntu 17.04 32 bit. When i test it shows me fatal error:systemc.h no such file or directory. #include<systemc.h> compilation terminated. Kindly help Regards Quote Link to comment Share on other sites More sharing options...
maehne Posted February 27, 2019 Report Share Posted February 27, 2019 The SystemC libraries and their associated headers are usually not installed into the standard locations (/usr/lib/ and /usr/include/), where they would be found automatically by the compiler and linker. Instead, they are typically installed into their own directory hierarchy, e.g., below /opt/systemc-2.3.1/. Therefore, you need to indicate their location explicitly to the compiler and linker by passing the appropriate flags, e.g.: $ c++ -o my_tb my_tb.cpp -I/opt/systemc-2.3.1/include -L/opt/systemc-2.3.1/lib-linux -lsystemc Due to this, you also usually include the SystemC header using #include "systemc" to indicate that it is not a standard system header. I suggest that you first test your SystemC installation by compiling, linking, and running a pure SystemC example (e.g., the single-file simple_perf example, which is distributed as part of the SystemC PoC implementation in the directory examples/sysc/simple_perf/). From your questions, it seems that you are not particularly familiar with C++ and the associated toolchains. I would recommend that you first learn about them before focusing on SystemC and then Nigram. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.