Commit 0a0b856d authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Silent warning about cuda registration when no GPUs are involved

parent 45327348
......@@ -151,7 +151,7 @@ MORSE_desc_t morse_desc_init_user(MORSE_enum dtyp, int mb, int nb, int bsiz,
desc.occurences = 0;
desc.use_mat = 1;
desc.alloc_mat = 1;
desc.register_mat = 1;
desc.register_mat = (morse->ncudas > 0) ? 1 : 0;
desc.ooc = 0;
desc.myrank = RUNTIME_comm_rank( morse );
......
......@@ -127,6 +127,8 @@ void RUNTIME_desc_create( MORSE_desc_t *desc )
rc = cudaHostRegister( desc->mat, size, cudaHostRegisterPortable );
if ( rc != cudaSuccess )
{
/* Disable the unregister as register failed */
desc->register_mat = 0;
morse_warning("RUNTIME_desc_create(StarPU): cudaHostRegister - ", cudaGetErrorString( rc ));
}
}
......
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