Skip to content

Commit 97ba09f

Browse files
committed
Merge pull request open-mpi#580 from rolfv/pr/fix-cuda-verbose-output-2.x
Fix cuda verbosity messages
2 parents ed04d83 + c708ffc commit 97ba09f

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

opal/mca/common/cuda/common_cuda.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,9 +1103,9 @@ int cuda_getmemhandle(void *base, size_t size, mca_mpool_base_registration_t *ne
11031103
*/
11041104
int cuda_ungetmemhandle(void *reg_data, mca_mpool_base_registration_t *reg)
11051105
{
1106-
CUDA_DUMP_EVTHANDLE((100, ((mca_mpool_common_cuda_reg_t *)reg)->data.evtHandle, "cuda_ungetmemhandle"));
11071106
opal_output_verbose(10, mca_common_cuda_output,
11081107
"CUDA: cuda_ungetmemhandle (no-op): base=%p", reg->base);
1108+
CUDA_DUMP_MEMHANDLE((100, ((mca_mpool_common_cuda_reg_t *)reg)->data.memHandle, "cuda_ungetmemhandle"));
11091109

11101110
return OPAL_SUCCESS;
11111111
}
@@ -1691,10 +1691,10 @@ static void cuda_dump_memhandle(int verbose, void *memHandle, char *str) {
16911691
}
16921692
memcpy(&memH, memHandle, sizeof(memH));
16931693
opal_output_verbose(verbose, mca_common_cuda_output,
1694-
"%s:ctxId=%d, pid=%d, size=%d, blocksize=%d, offset=%d, gpuId=%d, "
1695-
"subDeviceIndex=%d, serial=%d",
1696-
str, (int)memH.ctxId, memH.pid, (int)memH.size, (int)memH.blocksize, (int)memH.offset,
1697-
memH.gpuId, memH.subDeviceIndex, (int)memH.serial);
1694+
"%s:ctxId=0x%" PRIx64 ", pid=%d, size=%" PRIu64 ", blocksize=%" PRIu64 ", offset=%"
1695+
PRIu64 ", gpuId=%d, subDeviceIndex=%d, serial=%" PRIu64,
1696+
str, memH.ctxId, memH.pid, memH.size, memH.blocksize, memH.offset,
1697+
memH.gpuId, memH.subDeviceIndex, memH.serial);
16981698
}
16991699

17001700
/*
@@ -1705,21 +1705,18 @@ static void cuda_dump_evthandle(int verbose, void *evtHandle, char *str) {
17051705

17061706
struct InterprocessEventHandleInternal
17071707
{
1708-
/* The first two entries are the CUinterprocessCtxHandle */
1709-
int64_t ctxId; /* unique (within a process) id of the sharing context */
1710-
int pid; /* pid of sharing context */
1711-
1712-
int pad; /* pad to match the structure */
1713-
int index;
1708+
unsigned long pid;
1709+
unsigned long serial;
1710+
int index;
17141711
} evtH;
17151712

17161713
if (NULL == str) {
17171714
str = "CUDA";
17181715
}
17191716
memcpy(&evtH, evtHandle, sizeof(evtH));
17201717
opal_output_verbose(verbose, mca_common_cuda_output,
1721-
"CUDA: %s:ctxId=%d, pid=%d, index=%d",
1722-
str, (int)evtH.ctxId, evtH.pid, (int)evtH.index);
1718+
"CUDA: %s:pid=%lu, serial=%lu, index=%d",
1719+
str, evtH.pid, evtH.serial, evtH.index);
17231720
}
17241721

17251722

0 commit comments

Comments
 (0)