Skip to content

Commit

Permalink
Included a taskgraph-testsuite with a taskGraph compare script-method
Browse files Browse the repository at this point in the history
Added a Benchmark stub for the hpcom project to the runtime
Custom attributes for graphml-nodes added
Some changes at the HpcomTaskGraph-module 


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16436 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Jun 21, 2013
1 parent 960b411 commit 233182a
Show file tree
Hide file tree
Showing 18 changed files with 1,321 additions and 88 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -5784,7 +5784,7 @@ algorithm
end matchcontinue;
end countOperations1;

protected function countOperationstraverseComps "function countOperationstraverseComps
public function countOperationstraverseComps "function countOperationstraverseComps
author: Frenkel TUD 2012-05"
input BackendDAE.StrongComponents inComps;
input BackendDAE.EqSystem isyst;
Expand Down
66 changes: 66 additions & 0 deletions Compiler/BackEnd/HpcOmBenchmark.mo
@@ -0,0 +1,66 @@
/*
* This file is part of OpenModelica.
*
* Copyright (c) 1998-CurrentYear, Linköping University,
* Department of Computer and Information Science,
* SE-58183 Linköping, Sweden.
*
* All rights reserved.
*
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3
* AND THIS OSMC PUBLIC LICENSE (OSMC-PL).
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
* ACCEPTANCE OF THE OSMC PUBLIC LICENSE.
*
* The OpenModelica software and the Open Source Modelica
* Consortium (OSMC) Public License (OSMC-PL) are obtained
* from Linköping University, either from the above address,
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or
* http://www.openmodelica.org, and in the OpenModelica distribution.
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
*
* This program is distributed WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS
* OF OSMC-PL.
*
* See the full OSMC Public License conditions for more details.
*
*/

encapsulated package HpcOmBenchmark
" file: HpcOmBenchmark.mo
package: HpcOmBenchmark
description: HpcOmBenchmark contains the whole logic to measure the communication and processing time.

RCS: $Id: HpcOmBenchmark.mo 15486 2013-06-10 11:12:35Z marcusw $
"

public import BackendDAE;

protected import BackendDAEOptimize;
protected import HpcOmBenchmarkExt;

public function timeForCalculation
" author: marcusw
date: 2013-06-10
Estimates the time (in ms) which is needed to calculate the given component.
"
input BackendDAE.StrongComponent icomponent;
input BackendDAE.EqSystem isyst;
input BackendDAE.Shared ishared;
output Integer processingTime;

protected
Integer op1,op2;
Integer mulCost, addCost;

algorithm
((op1,op2,_)) := BackendDAEOptimize.countOperationstraverseComps({icomponent},isyst,ishared,(0,0,0));
mulCost := HpcOmBenchmarkExt.requiredTimeForMult();
addCost := HpcOmBenchmarkExt.requiredTimeForAdd();
processingTime := addCost * op1 + mulCost * op2;
end timeForCalculation;

end HpcOmBenchmark;
53 changes: 53 additions & 0 deletions Compiler/BackEnd/HpcOmBenchmarkExt.mo
@@ -0,0 +1,53 @@
/*
* This file is part of OpenModelica.
*
* Copyright (c) 1998-CurrentYear, Linköping University,
* Department of Computer and Information Science,
* SE-58183 Linköping, Sweden.
*
* All rights reserved.
*
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3
* AND THIS OSMC PUBLIC LICENSE (OSMC-PL).
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
* ACCEPTANCE OF THE OSMC PUBLIC LICENSE.
*
* The OpenModelica software and the Open Source Modelica
* Consortium (OSMC) Public License (OSMC-PL) are obtained
* from Linköping University, either from the above address,
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or
* http://www.openmodelica.org, and in the OpenModelica distribution.
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
*
* This program is distributed WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS
* OF OSMC-PL.
*
* See the full OSMC Public License conditions for more details.
*
*/

encapsulated package HpcOmBenchmarkExt
" file: HpcOmBenchmarkExt.mo
package: HpcOmBenchmarkExt
description: HpcOmBenchmarkExt is a adapter package to handle the benchmark-calculation in c/c++.
RCS: $Id: HpcOmBenchmarkExt.mo 15486 2013-05-24 11:12:35Z marcusw $
"

function requiredTimeForMult
output Integer requiredTime;

external "C" requiredTime=HpcOmBenchmarkExt_requiredTimeForMult() annotation(Library = "omcruntime");

end requiredTimeForMult;

function requiredTimeForAdd
output Integer requiredTime;

external "C" requiredTime=HpcOmBenchmarkExt_requiredTimeForAdd() annotation(Library = "omcruntime");
end requiredTimeForAdd;

end HpcOmBenchmarkExt;

0 comments on commit 233182a

Please sign in to comment.