Skip to content

Commit 57740a6

Browse files
committed
- attempt to get the same output on any system by using fflush(NULL); where messages are printed
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17304 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent bec7e26 commit 57740a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SimulationRuntime/c/simulation/simulation_runtime.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,7 @@ static void omc_assert_simulation(FILE_INFO info, const char *msg, ...)
959959
vfprintf(stderr,msg,ap);
960960
fputs("\n",stderr);
961961
va_end(ap);
962+
fflush(NULL);
962963
longjmp(simulationJmpbuf,1);
963964
break;
964965
case ERROR_NONLINEARSOLVER:
@@ -968,6 +969,7 @@ static void omc_assert_simulation(FILE_INFO info, const char *msg, ...)
968969
fputs("Error: ",stderr);
969970
vfprintf(stderr,msg,ap);
970971
fputs("\n",stderr);
972+
fflush(NULL);
971973
va_end(ap);
972974
}
973975
longjmp(nonlinearJmpbuf,1);
@@ -979,6 +981,7 @@ static void omc_assert_simulation(FILE_INFO info, const char *msg, ...)
979981
fputs("Error: ",stderr);
980982
vfprintf(stderr,msg,ap);
981983
fputs("\n",stderr);
984+
fflush(NULL);
982985
va_end(ap);
983986
}
984987
longjmp(integratorJmpbuf,1);
@@ -1001,6 +1004,7 @@ static void omc_assert_warning_simulation(FILE_INFO info, const char *msg, ...)
10011004
fputs("Warning: ",stderr);
10021005
vfprintf(stderr,msg,ap);
10031006
fputs("\n",stderr);
1007+
fflush(NULL);
10041008
va_end(ap);
10051009
}
10061010

0 commit comments

Comments
 (0)