Skip to content

Commit 6d34cda

Browse files
committed
- Don't send 0 memory states when using dynamic number of OMP threads
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10921 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent b1e6a82 commit 6d34cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/susan_codegen/SimCode/CodegenC.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ template functionODE(list<list<SimEqSystem>> derivativEquations, Text method)
972972

973973
void function_initMemoryState()
974974
{
975-
push_memory_states(<% if Flags.isSet(Flags.OPENMP) then noProc() else 1 %>);
975+
push_memory_states(<% if Flags.isSet(Flags.OPENMP) then (match noProc() case 0 then "omp_get_max_threads()" else noProc()) else 1 %>);
976976
}
977977

978978
int functionODE(DATA *data)

0 commit comments

Comments
 (0)