sstsimulator / sst-elements

SST Architectural Simulation Components and Libraries
http://www.sst-simulator.org
Other
90 stars 118 forks source link

SST-Merlin: Build issue while adding a new network topology #1901

Open saichenna opened 2 years ago

saichenna commented 2 years ago

I'm adding a new topology into SST Merlin library. In order to add this new topology, I have implemented a python build file which instantiates the routers and establishes links across the routers and endpoints. I was able to verify the correctness of my python file (pymerlin-topo-topology1.py) by dumping the output configuration graph using --output-dot argument. I have also implemented the routing logic in topology1.cc & topology1.h files. One important thing to point out is both the python and C++ files have some additional files which they import/include in the main implementation. Following is the file structure representing the actual implementation:

/merlin/topology: --> pymerlin-topo-topology1.py /merlin/topology: -->topology1.cc /merlin/topology: -->topology1.h /merlin/topology: -->helper.h (abstract class definition included in topology.h) /merlin/topology/folder1/-->helper1.py (this python file is imported in pymerlin-topo-topology1.py) /merlin/topology/folder1/-->helper1.h (this header file is included in topology1.cc) /merlin/topology/folder1/-->helper1.cc /merlin/topology/folder2/-->helper2.py (this python file is imported in pymerlin-topo-topology1.py) /merlin/topology/folder2/-->helper2.h (this header file is included in topology1.cc) /merlin/topology/folder2/-->helper2.cc /merlin/topology/folder3/-->helper3.py (this python file is imported in pymerlin-topo-topology1.py) /merlin/topology/folder3/-->helper3.h (this header file is included in topology1.cc) /merlin/topology/folder3/-->helper3.cc

In order to build Merlin with the following changes, I make the following changes to the Makefile.am and merlin.cc In Makefile.am(changes are in bold): ...... ...... topology/mesh.cc \ topology/fattree.h \ topology/fattree.cc \ topology/dragonfly.h \ topology/dragonfly.cc \ topology/singlerouter.h \ topology/singlerouter.cc \ topology/hyperx.h \ topology/hyperx.cc \ topology/topology1.h \ topology/topology1.cc \ topology/folder1/helper1.h \ topology/folder1/helper1.cc \ topology/folder2/helper2.h \ topology/folder2/helper2.cc \ topology/folder3/helper3.h \ topology/folder3/helper3.cc ** ...... ...... topology/pymerlin-topo-dragonfly.py \ topology/pymerlin-topo-hyperx.py \ topology/pymerlin-topo-fattree.py \ topology/pymerlin-topo-mesh.py \ topology/pymerlin-topo-topology1.py \ topology/folder1/helper1.py \ topology/folder2/helper2.py \ topology/folder3/helper3.py ...... ......

In merlin.cc (changes in bold):

char pymerlin_topo_mesh[] = {

include "topology/pymerlin-topo-mesh.inc"

0x00};

**char pymerlin_topo_topology1[] = {

include "topology/pymerlin-topo-topology1.inc"

0x00};**
........
........

primary_module->addSubModule("topology",pymerlin_topo_fattree,"topology/pymerlin-topo-fattree.py"); primary_module->addSubModule("topology",pymerlin_topo_mesh,"topology/pymerlin-topo-mesh.py"); primary_module->addSubModule("topology",pymerlin_topo_topology1,"topology/pymerlin-topo-topology1.py"); ........ ........

Finally, once these modifications are made. I run the following commands: elements/merlin:$ make all elements/merlin:$ cd .. elements:$ make install

Build process executed successfully with no errors. However, when running a sample test configuration file (An Ember pingpong motif), I get the following error(image attached):

image

Can you specify what could be a possible cause for this error? Also, can you specify how to add a network topology into merlin (i.e., how to rebuild merlin with these new changes) once we have the python build file and C++ routing files implemented, especially when they are implemented in multiple files (which is the case with us)?

NOTE: I previously added a simpler topology into merlin and built it successfully. It had a single python build file and a single C++ routing file. I was able to run some network simulations using Ember motifs on that topology. I'm not sure if this new issue is due to the additional files which I'm importing/including into the master files

feldergast commented 2 years ago

That typically means you have a function (called something close to base_routing) that is declared, usually in a header file, but there is no implementation of it in the library. The function would also likely have to be unused anywhere else in the library or it may have failed on compile (but this isn't always the case).