1
1

Merge pull request #891 from rolfv/pr/minor-cuda-verbosity-fixes

Fix cuda verbosity messages
Этот коммит содержится в:
Rolf vandeVaart 2015-09-11 16:33:22 -04:00
родитель b60b03d613 90dd1d264b
Коммит d78b954fd4

Просмотреть файл

@ -1103,9 +1103,9 @@ int cuda_getmemhandle(void *base, size_t size, mca_mpool_base_registration_t *ne
*/ */
int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg) int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg)
{ {
CUDA_DUMP_EVTHANDLE((100, ((mca_mpool_common_cuda_reg_t *)reg)->data.evtHandle, "cuda_ungetmemhandle"));
opal_output_verbose(10, mca_common_cuda_output, opal_output_verbose(10, mca_common_cuda_output,
"CUDA: cuda_ungetmemhandle (no-op): base=%p", reg->base); "CUDA: cuda_ungetmemhandle (no-op): base=%p", reg->base);
CUDA_DUMP_MEMHANDLE((100, ((mca_mpool_common_cuda_reg_t *)reg)->data.memHandle, "cuda_ungetmemhandle"));
return OPAL_SUCCESS; return OPAL_SUCCESS;
} }
@ -1691,9 +1691,9 @@ static void cuda_dump_memhandle(int verbose, void *memHandle, char *str) {
} }
memcpy(&memH, memHandle, sizeof(memH)); memcpy(&memH, memHandle, sizeof(memH));
opal_output_verbose(verbose, mca_common_cuda_output, opal_output_verbose(verbose, mca_common_cuda_output,
"%s:ctxId=%d, pid=%d, size=%d, blocksize=%d, offset=%d, gpuId=%d, " "%s:ctxId=%p, pid=%d, size=%d, blocksize=%d, offset=%d, gpuId=%d, "
"subDeviceIndex=%d, serial=%d", "subDeviceIndex=%d, serial=%d",
str, (int)memH.ctxId, memH.pid, (int)memH.size, (int)memH.blocksize, (int)memH.offset, str, (void *)memH.ctxId, memH.pid, (int)memH.size, (int)memH.blocksize, (int)memH.offset,
memH.gpuId, memH.subDeviceIndex, (int)memH.serial); memH.gpuId, memH.subDeviceIndex, (int)memH.serial);
} }
@ -1705,12 +1705,9 @@ static void cuda_dump_evthandle(int verbose, void *evtHandle, char *str) {
struct InterprocessEventHandleInternal struct InterprocessEventHandleInternal
{ {
/* The first two entries are the CUinterprocessCtxHandle */ unsigned long pid;
int64_t ctxId; /* unique (within a process) id of the sharing context */ unsigned long serial;
int pid; /* pid of sharing context */ int index;
int pad; /* pad to match the structure */
int index;
} evtH; } evtH;
if (NULL == str) { if (NULL == str) {
@ -1718,8 +1715,8 @@ static void cuda_dump_evthandle(int verbose, void *evtHandle, char *str) {
} }
memcpy(&evtH, evtHandle, sizeof(evtH)); memcpy(&evtH, evtHandle, sizeof(evtH));
opal_output_verbose(verbose, mca_common_cuda_output, opal_output_verbose(verbose, mca_common_cuda_output,
"CUDA: %s:ctxId=%d, pid=%d, index=%d", "CUDA: %s:pid=%d, serial=%d, index=%d",
str, (int)evtH.ctxId, evtH.pid, (int)evtH.index); str, (int)evtH.pid, (int)evtH.serial, (int)evtH.index);
} }