Skip to content

Commit 5b54a97

Browse files
committed
minor: add log about empty worktodo.txt for beginners
1 parent 0ce3707 commit 5b54a97

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/Gpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ void Gpu::doBigLog(u32 k, u64 res, bool checkOK, float secsPerIt, u32 nIters, u3
831831
log("%sZ=%.0f (avg %.1f)%s\n", makeLogStr(checkOK ? "OK" : "EE", k, res, secsPerIt, nIters).c_str(),
832832
z, zAvg.avg(), (nErrors ? " "s + to_string(nErrors) + " errors"s : ""s).c_str());
833833

834-
if (roeSq.N > 2 && z < 22) {
834+
if (roeSq.N > 2 && z < 20) {
835835
log("Danger ROE! Z=%.1f is too small, increase precision or FFT size!\n", z);
836836
}
837837

src/main.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,17 @@ int main(int argc, char **argv) {
107107
tune.carryTune();
108108
}
109109
} else {
110-
vector<Queue> queues;
111-
for (int i = 0; i < int(args.workers); ++i) { queues.emplace_back(context, args.profile); }
112-
113-
vector<jthread> threads;
114-
for (int i = 1; i < int(args.workers); ++i) {
115-
threads.emplace_back(gpuWorker, shared, &queues[i], i);
110+
{
111+
vector<Queue> queues;
112+
for (int i = 0; i < int(args.workers); ++i) { queues.emplace_back(context, args.profile); }
113+
vector<jthread> threads;
114+
for (int i = 1; i < int(args.workers); ++i) {
115+
threads.emplace_back(gpuWorker, shared, &queues[i], i);
116+
}
117+
gpuWorker(shared, &queues[0], 0);
116118
}
117-
gpuWorker(shared, &queues[0], 0);
119+
120+
log("No more work. Add work to worktodo.txt , see -h for details.\n");
118121
}
119122
} catch (const char *mes) {
120123
log("Exiting because \"%s\"\n", mes);

0 commit comments

Comments
 (0)