Skip to content

Commit

Permalink
Fixed so math functions works.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1564 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Mar 11, 2005
1 parent 6403b88 commit 8a982c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions modeq/modpar/Codegen.cpp
Expand Up @@ -288,6 +288,7 @@ void Codegen::generateSubTaskCode(VertexID task)
InEdgeIterator e,e_end;
int i;
int parentSize = getParentSize(task,m_tg);

vector<string> parentnames(parentSize);
vector<EdgeID> parentEdges(in_degree(task,*m_tg));

Expand Down Expand Up @@ -462,6 +463,8 @@ void Codegen::generateParallelMPIHeaders()
<< endl;
m_cstreamFunc << "#define BARRIER MPI_Barrier(MPI_COMM_WORLD)" << endl;

m_cstreamFunc << "#define abs(x) fabs(x)" << endl;

}

void Codegen::generateParallelMPIGlobals()
Expand All @@ -483,6 +486,7 @@ void Codegen::generateGlobals()
{
int numsteps = 100;
m_cstream << "#include <stdlib.h>" << endl;
m_cstream << "#include <math.h>" << endl;
m_cstream << "#include \"" << m_fileNameFunc << "\"" << endl << endl;
m_cstream << "#include \"solvers.hpp\"" << endl;
m_cstream << "#ifdef TIMING" << endl;
Expand Down
2 changes: 1 addition & 1 deletion modeq/modpar/Schedule.cpp
Expand Up @@ -391,7 +391,7 @@ void Schedule::tdsPass4()
temp = mergeTasks();

if (temp == -1) {
cerr << "temp == -1, problem?" << endl;
//cerr << "temp == -1, problem?" << endl;

} else {
numProc-= temp;
Expand Down
2 changes: 1 addition & 1 deletion modeq/modpar/TaskMerging.cpp
Expand Up @@ -104,7 +104,7 @@ void TaskMerging::merge(TaskGraph *taskgraph, TaskGraph* orig_tg,

while (m_change) {
m_change=false;
mergeRules();
mergeRules();
}
new_size = num_vertices(*m_taskgraph);

Expand Down

0 comments on commit 8a982c5

Please sign in to comment.