Rename testspeed argument npoolthread to nenginethread.

PiperOrigin-RevId: 945698744
Change-Id: Ida6d5ab24c88441fb05c778e8507d6369eb74f1c
This commit is contained in:
Yuval Tassa
2026-07-10 07:18:55 -07:00
committed by Copybara-Service
parent ff629889da
commit e6452e2c88
2 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ Where the command-line options and arguments are
* - ``--noiserate=X``
- 0.1
- rate of convergence to ctrl keyframe/midpoint
* - ``--npoolthread=N``
* - ``--nenginethread=N``
- 0
- number of threads in engine-internal threadpool
* - ``--solver=S``
@@ -89,9 +89,9 @@ Where the command-line options and arguments are
specified on the command line; otherwise, the model options configured in the XML file are preserved.
- The control noise arguments (``noisestd`` and ``noiserate``) prevent models from settling into a static state where,
due to warmstarts, one can measure artificially faster simulation.
- When ``npoolthread > 1`` is specified, an engine-internal thread pool is created with the specified number of
- When ``nenginethread > 1`` is specified, an engine-internal thread pool is created with the specified number of
threads, to speed up simulation of large scenes. Note that while it is possible to use both ``nthread`` and
``npoolthread``, the scenarios for which one would want these different types of multithreading are usually mutually
``nenginethread``, the scenarios for which one would want these different types of multithreading are usually mutually
exclusive.
- For more repeatable performance statistics, run the tool with the ``performance``
`governor <https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt>`__ on Linux, or the
+10 -10
View File
@@ -303,7 +303,7 @@ int main(int argc, char** argv) {
" --nthread=N 1 number of threads running parallel rollouts\n"
" --noisestd=X 0.01 scale of pseudo-random noise injected into actuators\n"
" --noiserate=X 0.1 rate of convergence to ctrl keyframe/midpoint\n"
" --npoolthread=N 0 number of threads in engine-internal threadpool\n"
" --nenginethread=N 0 number of threads in engine-internal threadpool\n"
" --solver=S Newton PGS, CG, Newton\n"
" --cone=C Pyramidal Pyramidal, Elliptic\n"
" --jacobian=J Auto Dense, Sparse, Auto\n"
@@ -317,7 +317,7 @@ int main(int argc, char** argv) {
"Note: If the model has a keyframe named \"test\", it will be loaded prior to simulation\n";
// default values
int nstep = 10000, nthread = 0, npoolthread = 0;
int nstep = 10000, nthread = 0, nenginethread = 0;
// inject small noise by default, to avoid fixed contact state
double noisestd = 0.01;
double noiserate = 0.1;
@@ -367,9 +367,9 @@ int main(int argc, char** argv) {
if (std::sscanf(val, "%lf", &noiserate) != 1) {
return finish("Invalid --noiserate argument");
}
} else if ((val = getarg("npoolthread"))) {
if (std::sscanf(val, "%d", &npoolthread) != 1) {
return finish("Invalid --npoolthread argument");
} else if ((val = getarg("nenginethread"))) {
if (std::sscanf(val, "%d", &nenginethread) != 1) {
return finish("Invalid --nenginethread argument");
}
} else if ((val = getarg("solver"))) {
int parsed = ParseEnum(val, {"PGS", "CG", "Newton"});
@@ -441,7 +441,7 @@ int main(int argc, char** argv) {
// clamp nthread to [1, maxthread]
nthread = mjMAX(1, mjMIN(maxthread, nthread));
npoolthread = mjMAX(1, mjMIN(maxthread, npoolthread));
nenginethread = mjMAX(1, mjMIN(maxthread, nenginethread));
// get filename, determine file type
std::string filename(model);
@@ -483,8 +483,8 @@ int main(int argc, char** argv) {
}
// make and bind threadpool
if (npoolthread > 1) {
mju_threadpool(runner.d[id], npoolthread);
if (nenginethread > 1) {
mju_threadpool(runner.d[id], nenginethread);
}
}
@@ -506,8 +506,8 @@ int main(int argc, char** argv) {
}
// print thread pool size
if (npoolthread > 1) {
std::printf(", using %d threads", npoolthread);
if (nenginethread > 1) {
std::printf(", using %d threads", nenginethread);
}
std::printf("...\n");