TraceR icon indicating copy to clipboard operation
TraceR copied to clipboard

Adding function to read xml file to dot file, along with a topology.x…

Open sappyb opened this issue 6 years ago • 7 comments

…ml file which is a quartz topology and test.xml which is a small topology for testing

sappyb avatar Jun 13 '19 23:06 sappyb

@Saptarshibh these files are not in the right place. The script and test topology file should be under utils/. The full quartz topology file shouldn't be checked in. Can you make that change?

bhatele avatar Jun 18 '19 16:06 bhatele

Sure, I am making the changes asap.

On Tue, Jun 18, 2019 at 9:06 AM Abhinav Bhatele [email protected] wrote:

@Saptarshibh https://github.com/Saptarshibh these files are not in the right place. The script and test topology file should be under utils/. The full quartz topology file shouldn't be checked in. Can you make that change?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LLNL/TraceR/pull/31?email_source=notifications&email_token=AIATY3NU5GOLIMKRVVGWL23P3EBZZA5CNFSM4HYBQMG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7EM5Y#issuecomment-503203447, or mute the thread https://github.com/notifications/unsubscribe-auth/AIATY3NFDKKOWQX6ANAWNQ3P3EBZZANCNFSM4HYBQMGQ .

sappyb avatar Jun 18 '19 16:06 sappyb

Hi, added some comments in file. Also, does the implementation handle any arbitrary graph or is it only for fat-tree variants?

ggeorgakoudis avatar Jun 18 '19 18:06 ggeorgakoudis

I kept it 48 for now, as a default, for nikhil said to keep it as a default 48 for now.

On Tue, Jun 18, 2019 at 11:27 AM Giorgis Georgakoudis < [email protected]> wrote:

@ggeorgakoudis commented on this pull request.

In utils/graphXmlDot.py https://github.com/LLNL/TraceR/pull/31#discussion_r294963574:

+class graphXml():

  • def init(self, fullFilePath, **kwargs):
  •    print('This is a small module to read an xml file into a graph.')
    
  •    print('To create the dot file call the function writeDot().')
    
  •    print('To draw the graph call function draw().')
    
  •    self.graphObj = None # Object For holding the NetworkX Graph
    
  •    self.dictOfNodes = None
    
  •    self.listOfTerminals = None
    
  •    self.levelsOfSwitches = None
    
  •    self.fullFilePath = fullFilePath
    
  • def writeDot(self, switchRadix=48, nodeTags='FIs', switchTags='Switches', write=True, **kwargs):
  •    tree = ET.parse(self.fullFilePath)
    
  •    root = tree.getroot()
    
  •    terminalIndex = 274877906944
    

Change to hex and add a comment on the format

In utils/graphXmlDot.py https://github.com/LLNL/TraceR/pull/31#discussion_r294963691:

+class graphXml():

  • def init(self, fullFilePath, **kwargs):
  •    print('This is a small module to read an xml file into a graph.')
    
  •    print('To create the dot file call the function writeDot().')
    
  •    print('To draw the graph call function draw().')
    
  •    self.graphObj = None # Object For holding the NetworkX Graph
    
  •    self.dictOfNodes = None
    
  •    self.listOfTerminals = None
    
  •    self.levelsOfSwitches = None
    
  •    self.fullFilePath = fullFilePath
    
  • def writeDot(self, switchRadix=48, nodeTags='FIs', switchTags='Switches', write=True, **kwargs):
  •    tree = ET.parse(self.fullFilePath)
    
  •    root = tree.getroot()
    
  •    terminalIndex = 274877906944
    
  •    switchIndex = 12884901888
    

Change to hex and add a comment on the format

In utils/graphXmlDot.py https://github.com/LLNL/TraceR/pull/31#discussion_r294963971:

  •        portsUsed += 1
    
  • return links, portsUsed

+class graphXml():

  • def init(self, fullFilePath, **kwargs):
  •    print('This is a small module to read an xml file into a graph.')
    
  •    print('To create the dot file call the function writeDot().')
    
  •    print('To draw the graph call function draw().')
    
  •    self.graphObj = None # Object For holding the NetworkX Graph
    
  •    self.dictOfNodes = None
    
  •    self.listOfTerminals = None
    
  •    self.levelsOfSwitches = None
    
  •    self.fullFilePath = fullFilePath
    
  • def writeDot(self, switchRadix=48, nodeTags='FIs', switchTags='Switches', write=True, **kwargs):

Should switchRadix be using a default value?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LLNL/TraceR/pull/31?email_source=notifications&email_token=AIATY3LT2RB7TM3SYTM6N43P3ESIPA5CNFSM4HYBQMG2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB35DK6Y#pullrequestreview-251278715, or mute the thread https://github.com/notifications/unsubscribe-auth/AIATY3NLVEYFTAIVJUXJ3YDP3ESIPANCNFSM4HYBQMGQ .

sappyb avatar Jun 18 '19 18:06 sappyb

I am changing the number to hex

On Tue, Jun 18, 2019 at 11:28 AM Giorgis Georgakoudis < [email protected]> wrote:

Hi, added some comments in file. Also, does the implementation handle any arbitrary graph or is it only for fat-tree variants?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LLNL/TraceR/pull/31?email_source=notifications&email_token=AIATY3LJCNQAD5XW7DI65NDP3ESLHA5CNFSM4HYBQMG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7RH5A#issuecomment-503256052, or mute the thread https://github.com/notifications/unsubscribe-auth/AIATY3NFERWJZOGSCM6FTULP3ESLHANCNFSM4HYBQMGQ .

sappyb avatar Jun 18 '19 18:06 sappyb

I tested it only for fat tree, it should be able to handle other graphs but i have not tested it with any.It is able to handle fat tree variants.

On Tue, Jun 18, 2019 at 11:29 AM Sap BH [email protected] wrote:

I am changing the number to hex

On Tue, Jun 18, 2019 at 11:28 AM Giorgis Georgakoudis < [email protected]> wrote:

Hi, added some comments in file. Also, does the implementation handle any arbitrary graph or is it only for fat-tree variants?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LLNL/TraceR/pull/31?email_source=notifications&email_token=AIATY3LJCNQAD5XW7DI65NDP3ESLHA5CNFSM4HYBQMG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX7RH5A#issuecomment-503256052, or mute the thread https://github.com/notifications/unsubscribe-auth/AIATY3NFERWJZOGSCM6FTULP3ESLHANCNFSM4HYBQMGQ .

sappyb avatar Jun 18 '19 18:06 sappyb

Saptarshi, next time, it would be helpful to answer the comments in code in their chat window.

Could you document what tests you did? Do those tests cover most/all of the expected functionality? Could you try a non fat-tree topology?

ggeorgakoudis avatar Jun 18 '19 18:06 ggeorgakoudis