Madmax -w option

Does madmax’s -w option function?

If I understand the help when issuing:
chia plotters madmax --help
… the -w will have madmax wait for the just-completed plot to copy itself to its final destination, before starting on the next plot’s creation.

But without the -w option, the above is how madmax conducts itself anyway.

Whether I use -w or I do not use -w, madmax does exactly the same thing.

Is this a bug?
What is the purpose of the -w option.

1 Like

I’m using Madmax from Madmax at the moment and leaving out the -w parameter it starts another plot immediatly after finishing P4. The (10G) copy to my final NAS storage finishes a bit after P1 table 2 completion.

Maybe it’s the implementation in the Chia version of Madmax, but I’ve used that as well and can’t remember it working differently.Will give it a try again.

@seymour.krelborn

Do you invoke the madmax plotter from the GUI? Windows?
I’m on Ubuntu but will run it from the GUI to test it’s behaviour without the -w parameter.

I am running Windows 10.

I execute the plotting via:
chia plotters madmax -k 34 blah blah blah

I just discovered that by specifying “-k 34” that it kicks off the plotting via “chia_plot_k34.exe”.
So that executable is different than the “chia_plot.exe” executable.

Perhaps the -w was not implemented in the chia_plot_k34.exe executable?

The help screen shows the -w option. But it could be that the developers simply copied the help screen from chia_plot.exe to chia_plot_k34.exe ?

So when you conduct your test, please try the chia_plot_k34.exe executable (or its equivalent in Linux).

It works for me, it waits till file is copied then starts the new plot.

Do you mean that it works for you when you use the -w option?

1 Like

You gave a thumb’s up to my question:
“Do you mean that it works for you when you use the -w option?”

That is how it should work. But that is not the issue I am questioning.

When I do not include the -w, it still waits for the file copy to complete before kicking off the next plotting job. It is as if the -w is there, even when I do not put it there.

Just started a K32 from GUI, but I couldn’t find a -w option there so indeed the Chia dev’s may have to chosen to default to -w and not even offer an option to disable it, GUI or CLI?!?
I don’t remember it waiting before but I used a subdirectory on the same nvme as the temp directory was on as final dir, so that must have been a near instant move operation instead of a real copy to disk.

I don’t want to do a K34 right now, but if you could try a K32 from CLI and test if skipping -w results in immediate restart of plotting (no wait for copy) that will be interesting too…

As I said in another thread, -w is one of the things that don’t work as intended in 1.2.11 if you use “chia plotters madmax”

They patched it after 1.2.11 was released, so the beta should have the fix and so will 1.3

If you use chia_plot (and not going through “chia plotters madmax”) it should work.

From the patch https://github.com/Chia-Network/chia-blockchain/pull/9197
" -w was not treated as a flag, and instead was passing a 0 or 1 value along to madmax. As a result, madmax was always running with the waitforcopy option set. The -w flag is now only passed along to madmax when True."

1 Like

Must have missed it :grin: But thanks and explains.

Although… I’m running v1.3 Beta here on the test machine and the GUI doesn’t provide an option for -w yet. Maybe final version.

Sorry forgot to say I use madmax from command line…

Well, the result are in.
In v1.3 Beta GUI there is no way to set -w to True/False and it defaults to True. So the Plot status remains ‘Plotting’ for the duration of the copy_to_fnaldir and the status of the next Plot remains Queued.

I’ll stick to Madmax’s own implementation (It also enables plotting MMX plots next to Chia;-)

1 Like

Have you tried a capital W, I needed to use the wait function recently, and I’m sure I got it to work, this was on Linux, and I extracted the cha plotters from a Chia install. Can’t check my parameters, as I’m at work.

I never tried the -w option as I manage my own plot sequencing using my own tools.

However, a lot of Unix/Linux things can be case sensitive, less so on Windows, but it depends on how it’s been coded. Worth a try…

The issue is getting madmax to not wait.

Whether using -w or not including it, either way, madmax waits for the copy to complete before starting on the next plot’s creation process.

@billy pointed out (maybe others, too?) that it is a known issue.

If/When the issue gets fixed, I would appreciate if anyone that learns of the fix would share the update in this thread.

You are on Windows - are you plotting with only one SSD ? As has been said before, do you have enough free space to have the ‘final’ directory for the plot to be the same SSD as the ‘temp’ directory ? If so, this will make the copy(/move) of the plot very fast, after which you can have a seperate batch file to move the plot from the SSD to final HDD.

This way, the MadMax plotter will start the next plot fairly quickly, whilst the batch file will move the plot in it’s own time.

I know this doesn’t fix the issue but it is a good workaround.

If you don’t want to wait for 1.3 to be released, you can use madmax directly without going through the “chia plotters madmax (…)”

Directory %LOCALAPPDATA%\chia-blockchain\app-1.2.11\resources\app.asar.unpacked\daemon\madmax has the executables.

cd %LOCALAPPDATA%\chia-blockchain\app-1.2.11\resources\app.asar.unpacked\daemon\madmax
chia_plot.exe (...)

Use chia_plot_k34.exe instead if you want up to k=34

The chia.exe executable, when passed the “plotters madmax -k 34” arguments, it passes those arguments over to chia_plot_k34.exe

Ultimately, it is “chia_plot_k34.exe” that runs, whether you use it directly, or via "chia plotters madmax blah blah blah.

But it passes them incorrectly, so use the exe directly!

taskmgr’s Details tab has an available “Command line” option for a column header.
That “Command line” column shows the command that is running, with all of its options (sort of – keep reading).

Due to the length of the command and all of its arguments, it does not display everything. But you can still unearth everything.

If you click on the cell containing the command line, and you press CTRL-c, then you can paste that data to notepad, and you will see the entire command line that chia_plot_k34.exe is running.

If you do not include the -w option, then chia_plot_k34.exe does not show it as an argument to the chia_plot_k34.exe command line. If you do include the -w, then it does show up in the command line.

But either way, the result at the completion of a plot is the same. madmax waits for the plot to complete its copying before starting on the next plot.

If chia.exe is incorrectly passing arguments to chia_plot_k34.exe, then I am not seeing the error on the full output of the command line.

Have you tested running chia_plot_k34.exe -k 34 etc, and found it to start the next plot’s creation while simultaneously copying the completed plot to its final destination?

I am all for running chia_plot_k34.exe directly, if that will result in madmax copying and processing at the same time. But I have k34 plots in progress, with the -n 34 option (to create 34 k34 plots), and I have a long way to go in the cycle. I do not want to interrupt the processing unless you are sure (unless you tested) and found that your recommendation is on the money.

Please confirm. Thank you.