HPCToolkit / hpcviewer.e4

Eclipse 4 version of hpcviewer
Other
9 stars 0 forks source link

Invalid metric index when merging databases #168

Closed laksono closed 2 years ago

laksono commented 2 years ago

Stack traces:

Experiment(BaseExperimentWithMetrics).getMetric(int) line: 302  
MetricVarMap.getValue(String) line: 83  
VarNode.eval(VarMap, FuncMap) line: 16  
DivNode.eval(VarMap, FuncMap) line: 17  
AggregateMetric.getValue(IMetricScope) line: 153    
Experiment(BaseExperimentWithMetrics).getNonEmptyMetricIDs(Scope) line: 277 
FlatScopeTreeData(ScopeTreeData).<init>(RootScope, IMetricManager, boolean) line: 48    
FlatScopeTreeData(ScopeTreeData).<init>(RootScope, IMetricManager) line: 54 
FlatScopeTreeData.<init>(RootScope, IMetricManager) line: 12    
FlatPart.getTreeData(RootScope, IMetricManager) line: 122   
FlatPart(AbstractTableView).createTable(IMetricManager) line: 233   
FlatPart(AbstractTableView).setInput(Object) line: 216  
FlatPart.setInput(Object) line: 71  
ProfilePart$RunViewCreation.run() line: 421 

The code:

    public BaseMetric getMetric(int index)
    {       
        BaseMetric metric = mapIndexToMetric.get(index);
        if (metric != null)
            return metric;

        // not found
        throw new RuntimeException("Invalid metric index: " + index);
    }

Variables:

laksono commented 2 years ago

Fixed in commit ce8e443