Rename testspeed argument npoolthread to nenginethread.
PiperOrigin-RevId: 945698744 Change-Id: Ida6d5ab24c88441fb05c778e8507d6369eb74f1c
This commit is contained in:
committed by
Copybara-Service
parent
ff629889da
commit
e6452e2c88
@@ -49,7 +49,7 @@ Where the command-line options and arguments are
|
|||||||
* - ``--noiserate=X``
|
* - ``--noiserate=X``
|
||||||
- 0.1
|
- 0.1
|
||||||
- rate of convergence to ctrl keyframe/midpoint
|
- rate of convergence to ctrl keyframe/midpoint
|
||||||
* - ``--npoolthread=N``
|
* - ``--nenginethread=N``
|
||||||
- 0
|
- 0
|
||||||
- number of threads in engine-internal threadpool
|
- number of threads in engine-internal threadpool
|
||||||
* - ``--solver=S``
|
* - ``--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.
|
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,
|
- 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.
|
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
|
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.
|
exclusive.
|
||||||
- For more repeatable performance statistics, run the tool with the ``performance``
|
- 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
|
`governor <https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt>`__ on Linux, or the
|
||||||
|
|||||||
+10
-10
@@ -303,7 +303,7 @@ int main(int argc, char** argv) {
|
|||||||
" --nthread=N 1 number of threads running parallel rollouts\n"
|
" --nthread=N 1 number of threads running parallel rollouts\n"
|
||||||
" --noisestd=X 0.01 scale of pseudo-random noise injected into actuators\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"
|
" --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"
|
" --solver=S Newton PGS, CG, Newton\n"
|
||||||
" --cone=C Pyramidal Pyramidal, Elliptic\n"
|
" --cone=C Pyramidal Pyramidal, Elliptic\n"
|
||||||
" --jacobian=J Auto Dense, Sparse, Auto\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";
|
"Note: If the model has a keyframe named \"test\", it will be loaded prior to simulation\n";
|
||||||
|
|
||||||
// default values
|
// 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
|
// inject small noise by default, to avoid fixed contact state
|
||||||
double noisestd = 0.01;
|
double noisestd = 0.01;
|
||||||
double noiserate = 0.1;
|
double noiserate = 0.1;
|
||||||
@@ -367,9 +367,9 @@ int main(int argc, char** argv) {
|
|||||||
if (std::sscanf(val, "%lf", &noiserate) != 1) {
|
if (std::sscanf(val, "%lf", &noiserate) != 1) {
|
||||||
return finish("Invalid --noiserate argument");
|
return finish("Invalid --noiserate argument");
|
||||||
}
|
}
|
||||||
} else if ((val = getarg("npoolthread"))) {
|
} else if ((val = getarg("nenginethread"))) {
|
||||||
if (std::sscanf(val, "%d", &npoolthread) != 1) {
|
if (std::sscanf(val, "%d", &nenginethread) != 1) {
|
||||||
return finish("Invalid --npoolthread argument");
|
return finish("Invalid --nenginethread argument");
|
||||||
}
|
}
|
||||||
} else if ((val = getarg("solver"))) {
|
} else if ((val = getarg("solver"))) {
|
||||||
int parsed = ParseEnum(val, {"PGS", "CG", "Newton"});
|
int parsed = ParseEnum(val, {"PGS", "CG", "Newton"});
|
||||||
@@ -441,7 +441,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
// clamp nthread to [1, maxthread]
|
// clamp nthread to [1, maxthread]
|
||||||
nthread = mjMAX(1, mjMIN(maxthread, nthread));
|
nthread = mjMAX(1, mjMIN(maxthread, nthread));
|
||||||
npoolthread = mjMAX(1, mjMIN(maxthread, npoolthread));
|
nenginethread = mjMAX(1, mjMIN(maxthread, nenginethread));
|
||||||
|
|
||||||
// get filename, determine file type
|
// get filename, determine file type
|
||||||
std::string filename(model);
|
std::string filename(model);
|
||||||
@@ -483,8 +483,8 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make and bind threadpool
|
// make and bind threadpool
|
||||||
if (npoolthread > 1) {
|
if (nenginethread > 1) {
|
||||||
mju_threadpool(runner.d[id], npoolthread);
|
mju_threadpool(runner.d[id], nenginethread);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -506,8 +506,8 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// print thread pool size
|
// print thread pool size
|
||||||
if (npoolthread > 1) {
|
if (nenginethread > 1) {
|
||||||
std::printf(", using %d threads", npoolthread);
|
std::printf(", using %d threads", nenginethread);
|
||||||
}
|
}
|
||||||
std::printf("...\n");
|
std::printf("...\n");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user