Skip to content

Commit

Permalink
Don't dump plot tables when the plot was deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
haorldbchi committed Sep 16, 2023
1 parent 60b2fc6 commit 623480a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
// "--memo", "80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef207d52406afa2b6d7d92ea778f407205bd9dca40816c1b1cacfca2a6612b93eb",

"args":
"-w -n 1 -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 cudaplot --check 100 --check-threshold 0.7 /home/harold/plot",
"-w -n 1 -z 1 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 cudaplot --check 100 --check-threshold 2 /home/harold/plot",

// "-w -z 3 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 --benchmark cudaplot /home/harold/plot",
// "-w -z 3 -f ade0cc43610ce7540ab96a524d0ab17f5df7866ef13d1221a7203e5d10ad2a4ae37f7b73f6cdfd6ddf4122e8a1c2f8ef -p 80a836a74b077cabaca7a76d1c3c9f269f7f3a8f2fa196a65ee8953eb81274eb8b7328d474982617af5a0fe71b47e9b8 -i c6b84729c23dc6d60c92f22c17083f47845c1179227c5509f07a5d2804a7b835 --benchmark cudaplot --disk-128 -t1 /home/harold/plotdisk /home/harold/plot",
Expand Down
8 changes: 5 additions & 3 deletions cuda/CudaPlotter.cu
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,17 @@ void CudaK32Plotter::Run( const PlotRequest& req )
// #TODO: Move it elsewhere, using different buffers for parks
// so that we can continue writing to disk until we get to
// actually writing the next plot in table 7 finalization.
if( !cx.plotChecker || !cx.plotChecker->LastPlotDeleted() )
{
const auto pltoCompleteTimer = TimerBegin();
cx.plotWriter->WaitForPlotToComplete();
const double plotIOTime = TimerEnd( pltoCompleteTimer );
Log::Line( "Completed writing plot in %.2lf seconds", plotIOTime );

cx.plotWriter->DumpTables();
Log::NewLine();
if( !cx.plotChecker || !cx.plotChecker->LastPlotDeleted() )
{
cx.plotWriter->DumpTables();
Log::NewLine();
}
}

delete cx.plotWriter;
Expand Down

0 comments on commit 623480a

Please sign in to comment.