You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fileio] Separate parameter adaption from display update rate
Split the logic for parameter adaption from the logic to update the display rate.
This decouples the two updates, so changes to display updates don't affect
parameter adaption.
Also add a test case that checks that parameter adaption actually happens.
This fixes Issue #3353, where --adapt is broken when --no-progress is passed.
if ( (zfp.consumed==previous_zfp_update.consumed) /* no data compressed : no data available, or no more buffer to compress to, OR compression is really slow (compression of a single block is slower than update rate)*/
1394
+
&& (zfp.nbActiveWorkers==0) /* confirmed : no compression ongoing */
1395
+
) {
1396
+
DISPLAYLEVEL(6, "all buffers full : compression stopped => slow down \n")
1397
+
speedChange=slower;
1398
+
}
1399
+
1400
+
previous_zfp_update=zfp;
1401
+
1402
+
if ( (newlyProduced> (newlyFlushed*9 / 8)) /* compression produces more data than output can flush (though production can be spiky, due to work unit : (N==4)*block sizes) */
1403
+
&& (flushWaiting==0) /* flush speed was never slowed by lack of production, so it's operating at max capacity */
1404
+
) {
1405
+
DISPLAYLEVEL(6, "compression faster than flush (%llu > %llu), and flushed was never slowed down by lack of production => slow down \n", newlyProduced, newlyFlushed);
1406
+
speedChange=slower;
1407
+
}
1408
+
flushWaiting=0;
1409
+
}
1410
+
1411
+
/* course correct only if there is at least one new job completed */
if ( (zfp.consumed==previous_zfp_update.consumed) /* no data compressed : no data available, or no more buffer to compress to, OR compression is really slow (compression of a single block is slower than update rate)*/
1428
-
&& (zfp.nbActiveWorkers==0) /* confirmed : no compression ongoing */
1429
-
) {
1430
-
DISPLAYLEVEL(6, "all buffers full : compression stopped => slow down \n")
1431
-
speedChange=slower;
1432
-
}
1433
-
1434
-
previous_zfp_update=zfp;
1435
-
1436
-
if ( (newlyProduced> (newlyFlushed*9 / 8)) /* compression produces more data than output can flush (though production can be spiky, due to work unit : (N==4)*block sizes) */
1437
-
&& (flushWaiting==0) /* flush speed was never slowed by lack of production, so it's operating at max capacity */
1438
-
) {
1439
-
DISPLAYLEVEL(6, "compression faster than flush (%llu > %llu), and flushed was never slowed down by lack of production => slow down \n", newlyProduced, newlyFlushed);
1440
-
speedChange=slower;
1441
-
}
1442
-
flushWaiting=0;
1443
-
}
1444
-
1445
-
/* course correct only if there is at least one new job completed */
0 commit comments