Commit 40bc52b4 authored by Mathieu Faverge's avatar Mathieu Faverge

Move the error about chameleon ncuda to the init function instead of doing it in timings

parent 9abc1b22
......@@ -103,6 +103,13 @@ int __chameleon_initpar(int ncpus, int ncudas, int nthreads_per_worker)
# endif
#endif
#if !defined(CHAMELEON_USE_CUDA)
if ( ncudas != 0 ) {
chameleon_warning("CHAMELEON_Init", "CHAMELEON_USE_CUDA is not defined, ncudas is forced to 0");
ncudas = 0;
}
#endif
RUNTIME_init( chamctxt, ncpus, ncudas, nthreads_per_worker );
#if defined(CHAMELEON_USE_MPI)
......
......@@ -730,20 +730,12 @@ main(int argc, char *argv[]) {
int stop = 5000;
int step = 500;
int iparam[IPARAM_SIZEOF];
int return_code;
set_iparam_default(iparam);
parse_arguments(&argc, &argv, iparam, &start, &stop, &step);
#if !defined(CHAMELEON_USE_CUDA)
if (iparam[IPARAM_NCUDAS] != 0){
fprintf(stderr, "ERROR: CHAMELEON_USE_CUDA is not defined. "
"The number of CUDA devices must be set to 0 (--gpus=0).\n");
return EXIT_FAILURE;
}
#endif
int return_code;
/* Initialize CHAMELEON */
CHAMELEON_Init( iparam[IPARAM_THRDNBR],
iparam[IPARAM_NCUDAS] );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment