- else // Process command line arguments
- {
- if (string(argv[1]) != "bench" || argc < 4 || argc > 7)
- cout << "Usage: stockfish bench <hash size> <threads> "
- << "[limit = 12] [fen positions file = default] "
- << "[depth, time, perft or node limited = depth]" << endl;
- else
- {
- string val = argc > 4 ? argv[4] : "12";
- string fen = argc > 5 ? argv[5] : "default";
- string lim = argc > 6 ? argv[6] : "depth";
- benchmark(string(argv[2]) + " " + string(argv[3]) + " " + val + " " + fen + " " + lim);
- }
- }
-
- Application::free_resources();
+ else if (string(argv[1]) == "bench" && argc < 8)
+ benchmark(argc, argv);
+ else
+ cout << "Usage: stockfish bench [hash size = 128] [threads = 1] "
+ << "[limit = 12] [fen positions file = default] "
+ << "[limited by depth, time, nodes or perft = depth]" << endl;
+
+ Threads.exit();