Mentions légales du service

Skip to content
Snippets Groups Projects
Commit efd04f4d authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'issue87/default_thrdnbr' into 'master'

Fix issue #87 by setting the number of threads to the default on the machine

Closes #87

See merge request !183
parents e642ff22 9351d753
No related branches found
No related tags found
1 merge request!183Fix issue #87 by setting the number of threads to the default on the machine
......@@ -42,10 +42,10 @@ static parameter_t parameters[] = {
{ "nowarmup", "Disable the warmup run to load libraries", -31, PARAM_OPTION, 0, 0, TestValInt, {0}, NULL, pread_int, sprint_int },
{ NULL, "Machine parameters", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL },
{ "threads", "Number of CPU workers per node", 't', PARAM_OPTION | PARAM_OUTPUT, 1, 7, TestValInt, {1}, NULL, pread_int, sprint_int },
{ "gpus", "Number of GPU workers per node", 'g', PARAM_OPTION | PARAM_OUTPUT, 1, 4, TestValInt, {0}, NULL, pread_int, sprint_int },
{ "P", "Rows (P) in the PxQ process grid", 'P', PARAM_OPTION | PARAM_OUTPUT, 1, 2, TestValInt, {1}, NULL, pread_int, sprint_int },
{ "Q", "Columns (Q) in the PxQ process grid", 'Q', PARAM_OUTPUT, 1, 2, TestValInt, {1}, NULL, pread_int, sprint_int },
{ "threads", "Number of CPU workers per node", 't', PARAM_OPTION | PARAM_OUTPUT, 1, 7, TestValInt, {-1}, NULL, pread_int, sprint_int },
{ "gpus", "Number of GPU workers per node", 'g', PARAM_OPTION | PARAM_OUTPUT, 1, 4, TestValInt, { 0}, NULL, pread_int, sprint_int },
{ "P", "Rows (P) in the PxQ process grid", 'P', PARAM_OPTION | PARAM_OUTPUT, 1, 2, TestValInt, { 1}, NULL, pread_int, sprint_int },
{ "Q", "Columns (Q) in the PxQ process grid", 'Q', PARAM_OUTPUT, 1, 2, TestValInt, { 1}, NULL, pread_int, sprint_int },
{ NULL, "Main input parameters", 0, PARAM_OPTION, 0, 0, 0, {0}, NULL, NULL, NULL },
{ "op", "Operation to test/time", 'o', PARAM_OPTION | PARAM_OUTPUT, 1, 1, TestString, {0}, NULL, pread_string, sprint_string },
......@@ -506,6 +506,13 @@ int main (int argc, char **argv) {
CHAMELEON_Init( ncores, ngpus );
/* Set ncores to the right value */
if ( ncores == -1 ) {
parameter_t *param;
param = parameters_get( 't' );
param->value.ival = CHAMELEON_GetThreadNbr();
}
/* Binds the right function to be called and builds the parameters combinations */
test = testing_gettest( argv[0], func_name );
free(func_name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment