From 791a3a5ec606dd9a59c2bf668fdbb537d4dd2641 Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Mon, 27 Jan 2014 18:35:01 +0000 Subject: [PATCH] Fix CUDA-aware support with sendi optimization. Need to make sure copy function is initialized. This commit was SVN r30437. --- opal/datatype/opal_datatype_cuda.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opal/datatype/opal_datatype_cuda.c b/opal/datatype/opal_datatype_cuda.c index efc6eff7e1..b14edb8789 100755 --- a/opal/datatype/opal_datatype_cuda.c +++ b/opal/datatype/opal_datatype_cuda.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -47,13 +47,16 @@ void mca_cuda_convertor_init(opal_convertor_t* convertor, const void *pUserBuf) opal_cuda_support_init(); } + /* This is needed to handle case where convertor is not fully initialized + * like when trying to do a sendi with convertor on the statck */ + convertor->cbmemcpy = (memcpy_fct_t)&opal_cuda_memcpy; + /* If not enabled, then nothing else to do */ if (!opal_cuda_enabled) { return; } if (ftable.gpu_is_gpu_buffer(pUserBuf)) { - convertor->cbmemcpy = (memcpy_fct_t)&opal_cuda_memcpy; convertor->flags |= CONVERTOR_CUDA; } }