Skip to content

Commit 39a50f2

Browse files
committed
Expose --no-direct-io to CLI
Cleanup some temp files after disk-hybrid cuda plotting
1 parent 7af0a3c commit 39a50f2

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

cuda/CudaPlotter.cu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,10 @@ void CudaK32Plotter::Run( const PlotRequest& req )
313313
#if !(DBG_BBCU_KEEP_TEMP_FILES)
314314
if( cx.plotRequest.IsFinalPlot && cx.cfg.hybrid128Mode )
315315
{
316+
if( cx.diskContext->yBuffer ) delete cx.diskContext->yBuffer;
316317
if( cx.diskContext->metaBuffer ) delete cx.diskContext->metaBuffer;
317318
if( cx.diskContext->unsortedL ) delete cx.diskContext->unsortedL;
319+
if( cx.diskContext->unsortedR ) delete cx.diskContext->unsortedR;
318320

319321
for( TableId t = TableId::Table1; t <= TableId::Table7; t++ )
320322
{
@@ -1309,7 +1311,7 @@ void AllocBuffers( CudaK32PlotContext& cx )
13091311
allocateHostTablesPinned = false;
13101312
#endif
13111313

1312-
Log::Line( "Table pairs allocated as pinned: %s", allocateHostTablesPinned ? "true" : "false" );
1314+
// Log::Line( "Table pairs allocated as pinned: %s", allocateHostTablesPinned ? "true" : "false" );
13131315
if( allocateHostTablesPinned )
13141316
CudaErrCheck( cudaMallocHost( &cx.hostBufferTables, cx.hostTableAllocSize, cudaHostAllocDefault ) );
13151317
else

src/main.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ void ParseCommandLine( GlobalPlotConfig& cfg, IPlotter*& outPlotter, int argc, c
177177
// The next parameter is potentially the compression level
178178
if( IsNumber( cli.Peek() ) )
179179
cfg.compressionLevel = (uint32)cli.ReadU64();
180-
180+
181181
continue;
182182
}
183+
else if( cli.ReadSwitch( cfg.disableOutputDirectIO, "--no-direct-io" ) )
184+
continue;
183185
else if( cli.ReadStr( cfg.plotMemoStr, "--memo" ) )
184186
continue;
185187
else if( cli.ReadSwitch( cfg.showMemo, "--show-memo" ) )
@@ -542,7 +544,7 @@ R"(
542544
543545
-t, --threads : Maximum number of threads to use.
544546
By default, this is set to the maximum number of logical cpus present.
545-
547+
546548
-n, --count : Number of plots to create. Default = 1.
547549
548550
-f, --farmer-key : Farmer public key, specified in hexadecimal format.
@@ -561,7 +563,11 @@ R"(
561563
Current compression levels supported are from 0 to 7 (inclusive).
562564
Where 0 means no compression, and 7 is the highest compression.
563565
Higher compression means smaller plots, but more CPU usage during harvesting.
564-
566+
567+
--no-direct-io : Disable direct I/O when writing plot files.
568+
Enable this if writing to a storage destination
569+
that does not support direct I/O.
570+
565571
--benchmark : Enables benchmark mode. This is meant to test plotting without
566572
actually writing a final plot to disk.
567573
@@ -583,10 +589,10 @@ R"(
583589
This is useful when running multiple simultaneous
584590
instances of Bladebit as you can manually
585591
assign thread affinity yourself when launching Bladebit.
586-
592+
587593
--memory : Display system memory available, in bytes, and the
588594
required memory to run Bladebit, in bytes.
589-
595+
590596
--memory-json : Same as --memory, but formats the output as json.
591597
592598
--version : Display current version.

0 commit comments

Comments
 (0)