Skip to content
Snippets Groups Projects
Commit c63ce962 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Failed (bug fix)

parent d116e544
No related branches found
No related tags found
1 merge request!118M214003/develop
Pipeline #40858 passed
...@@ -28,7 +28,6 @@ class ModuleTimstat3 ...@@ -28,7 +28,6 @@ class ModuleTimstat3
{ {
CdiDateTime vDateTime{}; CdiDateTime vDateTime{};
int vlistID[NIN], vlistID2 = -1; int vlistID[NIN], vlistID2 = -1;
int is;
Varray3D<int> iwork[NIWORK]; Varray3D<int> iwork[NIWORK];
FieldVector2D fwork[NFWORK]; FieldVector2D fwork[NFWORK];
int reached_eof[NIN]; int reached_eof[NIN];
...@@ -62,8 +61,8 @@ public: ...@@ -62,8 +61,8 @@ public:
cdo_initialize(process); cdo_initialize(process);
// clang-format off // clang-format off
VARQUOT2TEST = cdo_operator_add("varquot2test", 0, 0, nullptr); VARQUOT2TEST = cdo_operator_add("varquot2test", 0, 0, nullptr);
MEANDIFF2TEST = cdo_operator_add("meandiff2test", 0, 0, nullptr); MEANDIFF2TEST = cdo_operator_add("meandiff2test", 0, 0, nullptr);
// clang-format on // clang-format on
operatorID = cdo_operator_id(); operatorID = cdo_operator_id();
...@@ -79,7 +78,7 @@ public: ...@@ -79,7 +78,7 @@ public:
if (risk <= 0 || risk >= 1) cdo_abort("Risk must be greater than 0 and lower than 1!"); if (risk <= 0 || risk >= 1) cdo_abort("Risk must be greater than 0 and lower than 1!");
} }
for (is = 0; is < NIN; ++is) for (int is = 0; is < NIN; ++is)
{ {
streamID[is] = cdo_open_read(is); streamID[is] = cdo_open_read(is);
vlistID[is] = cdo_stream_inq_vlist(streamID[is]); vlistID[is] = cdo_stream_inq_vlist(streamID[is]);
...@@ -137,12 +136,14 @@ public: ...@@ -137,12 +136,14 @@ public:
} }
} }
} }
void void
init() run()
{ {
int tsID = 0; int tsID = 0;
while (true) while (true)
{ {
int is;
for (is = 0; is < NIN; ++is) for (is = 0; is < NIN; ++is)
{ {
if (reached_eof[is]) continue; if (reached_eof[is]) continue;
...@@ -277,11 +278,12 @@ public: ...@@ -277,11 +278,12 @@ public:
cdo_write_record(streamID3, out[0].vec_d.data(), field_num_miss(out[0])); cdo_write_record(streamID3, out[0].vec_d.data(), field_num_miss(out[0]));
} }
} }
void void
close() close()
{ {
cdo_stream_close(streamID3); cdo_stream_close(streamID3);
for (is = 0; is < NIN; ++is) cdo_stream_close(streamID[is]); for (int is = 0; is < NIN; ++is) cdo_stream_close(streamID[is]);
cdo_finish(); cdo_finish();
} }
...@@ -290,5 +292,10 @@ public: ...@@ -290,5 +292,10 @@ public:
void * void *
Timstat3(void *process) Timstat3(void *process)
{ {
ModuleTimstat3 timstat3;
timstat3.init(process);
timstat3.run();
timstat3.close();
return nullptr; return nullptr;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment