예제 #1
0
    def report(self) -> None:
        '''
        Generate report
        '''
        logger.emlog(F'# {self.config.args.name} Report')
        logger.log('creating report...\n')

        # Setup Table
        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataraw = csv.writer(sio)

        header = ['Time', 'KBytesXchng/Rank-Max', 'MB/S/Rank', 'Command']
        dataraw.writerow(header)
        table.addrow(header)

        # Populate table.
        for index, entry in enumerate(self.data['results']):
            table.addrow(entry)
            entry.append(self.data['commands'][index])
            dataraw.writerow(entry)

        # Write table to csv & display to terminal.
        csvname = self.config.args.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvname))
        table.emit()
        logger.log('')
예제 #2
0
    def report(self):
        logger.emlog(F'# {experiment.name()} Report')

        header = [
            'solver_id', 'numpe', 'tottime', 'nx,ny,nz', 'px,py,pz', 'fom'
        ]

        data = zip(self.data['solver_id'], self.data['numpe'],
                   self.data['tottime'], self.data['nxnynz'],
                   self.data['pxpypz'], self.data['fom'])

        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataw = csv.writer(sio)
        dataw.writerow([F'## {self.config.args.description}'])
        dataw.writerow(header)
        table.addrow(header, withrule=True)
        for solid, numpe, tott, nxyz, pxyz, fom in data:
            row = [solid, numpe, tott, nxyz, pxyz, fom]
            dataw.writerow(row)
            table.addrow(row)

        csvfname = self.config.args.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvfname))
        table.emit()
        logger.log('')
예제 #3
0
    def report(self):
        logger.emlog(F'# {experiment.name()} Report')

        header = ['numpe', 'tottime', 'cgh1', 'cgl2']

        data = zip(self.data['command'], self.data['starttime'],
                   self.data['numpe'], self.data['nthread'],
                   self.data['tottime'], self.data['cgh1'], self.data['cgl2'])

        icapt_rds = None
        if utils.module_imported('icaptdb'):
            icapt_rds = icaptdb.RunDataStore(self.config.args)

        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataw = csv.writer(sio)
        dataw.writerow([F'## {self.config.args.description}'])
        dataw.writerow(header)
        table.addrow(header, withrule=True)
        for cmd, stime, numpe, nthread, tott, cgh1, cgl2 in data:
            row = [numpe, tott, cgh1, cgl2]
            dataw.writerow(row)
            table.addrow(row)
            if icapt_rds is not None:
                icapt_rds.add(stime.strftime('%a %b %d %H:%M:%S %Y'), tott,
                              numpe, nthread, cmd, [
                                  FOMFactory.build('cgh1', cgh1),
                                  FOMFactory.build('cgl2', cgl2)
                              ])

        csvfname = self.config.args.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvfname))
        table.emit()
        logger.log('')
예제 #4
0
    def report(self) -> None:
        '''
        Generate csv report.
        '''
        logger.emlog(F'# {self.config.args.name} Report')
        logger.log('creating report...\n')

        # Setup table
        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataraw = csv.writer(sio)

        # Column header
        header = self.keywords
        dataraw.writerow(header)
        table.addrow(header)

        # Populate csv table.
        for index, entry in enumerate(self.data['results']):
            table.addrow(entry)  # Terminal table.

            # Add command column to csv file.
            entry.append(self.data['commands'][index])
            dataraw.writerow(entry)

        csvfname = self.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvfname))
        table.emit()
        logger.log('')
예제 #5
0
    def report(self) -> None:
        '''
        Generate csv report
        '''
        logger.emlog(F'# {self.config.args.name} Report')
        logger.log('Creating report...')

        # Setup table.
        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataraw = csv.writer(sio)

        # Column headers.
        columns = []
        for label in self.keywords:
            columns.append(label)

        dataraw.writerow(columns)
        table.addrow(columns)

        # Populate table.
        for index, entry in enumerate(self.data['results']):
            table.addrow(entry)
            entry.append(self.data['commands'][index])
            dataraw.writerow(entry)

        # Write table to csv ad display to terminal.
        csvname = self.config.args.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvname))
        table.emit()
        logger.log('')
예제 #6
0
    def report(self) -> None:
        '''
        Generate csv report from run iterations.
        '''
        logger.emlog(F'# {experiment.name()} Report')

        # Setup table.
        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataraw = csv.writer(sio)

        header = ['Cycle', 'Cstop', 'Time', 'Tstop', 'Hydro Cycle', 'Command']
        dataraw.writerow(header)
        table.addrow(header)

        # Populate table.
        for index, entry in enumerate(self.data['results']):
            entry.append(self.data['commands'][index])
            dataraw.writerow(entry)
            table.addrow(entry)

        # Write table to csv & display to terminal.
        csvname = self.config.args.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvname))
        table.emit()
        logger.log('')
예제 #7
0
    def tabulate(self, label):
        logger.log(F"#{'-'*79}")
        logger.log(F"# name: {self.name}")
        logger.log(F"# numpe: {self.numpe}")
        logger.log(F"# numt: {self.numt}")
        logger.log(F"# window_size: {self.window_size}")
        logger.log(F"# mode: {self.mode}")
        logger.log(F"#{'-'*79}")

        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataw = csv.writer(sio)

        metad = [('numt', self.numt), ('window_size', self.window_size),
                 ('mode', self.mode)]

        # Write metadata header to csv file. Is this the best way to do this?
        for coll in metad:
            key = coll[0]
            val = coll[1]
            if not val:
                continue
            dataw.writerow([F'##{key}', val])

        dataw.writerow(self.metrics)
        table.addrow(self.metrics, withrule=True)
        for row in self.stats:
            table.addrow(row)
            dataw.writerow(row)
        table.emit()
        logger.log('\n')

        csvfname = F'{self.name}'
        csvfname += F'-{self.numpe}PE'
        if self.mode is not None:
            csvfname += F'-{self.mode.lower()}'
        csvfname += '.csv'

        opath = os.path.join(label.name, F'numpe-{label.numpe}',
                             F'runid-{label.generation}')
        metadata.add_asset(metadata.StringIOAsset(sio, csvfname, opath))
예제 #8
0
    def report(self):
        logger.emlog(F'# {experiment.name()} Report')

        header = ['NUMPE', 'NThread', 'Average Lookups/s', 'Total Lookups/s']

        data = zip(self.data['numpe'], self.data['nthread'],
                   self.data['alups'], self.data['tlups'])

        table = utils.Table()
        sio = io.StringIO(newline=None)
        dataw = csv.writer(sio)
        dataw.writerow([F'## {self.config.args.description}'])
        dataw.writerow(header)
        table.addrow(header, withrule=True)
        for numpe, nthread, alups, tlups in data:
            row = [numpe, nthread, alups, tlups]
            dataw.writerow(row)
            table.addrow(row)

        csvfname = self.config.args.csv_output
        metadata.add_asset(metadata.StringIOAsset(sio, csvfname))
        table.emit()
        logger.log('')