tromp / cuckoo

a memory-bound graph-theoretic proof-of-work system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Add structured output

casey opened this issue · comments

I'm working on a tool that runs a bunch of cuckoo cycle solvers and saves output (including time,
algorithm use, and graph size) to a file. The hope is that people in the community will use this tool to benchmark and report their GPU/CPU performance, which I can then use to produce a public website that shows the performance of the different solvers and algorithms across different GPUs and CPUs.

You can see the current work in progress code here.

Parsing data from the solver output was pretty painful. Would you consider adding some kind of structured output, for example JSON, to make such tools easier to write? Ideally it would log all parameters that the solver was launched with, information on the CPU or GPU which the solver was running on, and information about solution times for the graphs searched.

Wouldn't you rather use the provided

CALL_CONVENTION int run_solver(SolverCtx* ctx,
char* header,
int header_length,
u32 nonce,
u32 range,
SolverSolutions *solutions,
SolverStats *stats
)

// Solver statistics, to be instantiated by caller
// and filled by solver if desired
struct SolverStats {
u32 device_id = 0;
u32 edge_bits = 0;
char plugin_name[MAX_NAME_LEN]; // will be filled in caller-side
char device_name[MAX_NAME_LEN];
bool has_errored = false;
char error_reason[MAX_NAME_LEN];
u32 iterations = 0;
u64 last_start_time = 0;
u64 last_end_time = 0;
u64 last_solution_time = 0;
};

API for that?

😭Yes, yes I would. Thanks for the tip!

What is the suggested way to call that function? It's defined in mean.cu, along with main, but I'd like to call it from a separate binary with a different main function.

Gotcha, that makes sense. Thanks!