From 62ab0080170aa1f38e4ee0bcfdbe9d577c618e6c Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Fri, 7 Jun 2013 18:31:36 +0000 Subject: [PATCH] Fix SEGV because missing CUDA initialization. This commit was SVN r28601. --- opal/datatype/opal_datatype_cuda.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opal/datatype/opal_datatype_cuda.c b/opal/datatype/opal_datatype_cuda.c index 2ab8488c8d..b212ab248f 100755 --- a/opal/datatype/opal_datatype_cuda.c +++ b/opal/datatype/opal_datatype_cuda.c @@ -66,6 +66,11 @@ void mca_cuda_convertor_init(opal_convertor_t* convertor, const void *pUserBuf) */ bool opal_cuda_check_bufs(char *dest, char *src) { + /* Only do the initialization on the first GPU access */ + if (!initialized) { + opal_cuda_support_init(); + } + if (!opal_cuda_enabled) { return false; }