Skip to content

Commit dc4b772

Browse files
committed
Merge pull request open-mpi#560 from rolfv/pr/add-cuda-mpool-verbosity
While debugging user problems, these extra verbosity statements would be helpful
2 parents 40e0c41 + 6e74aaf commit dc4b772

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

opal/mca/mpool/rgpusm/mpool_rgpusm_module.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ static inline bool mca_mpool_rgpusm_deregister_lru (mca_mpool_base_module_t *mpo
105105
old_reg = (mca_mpool_base_registration_t*)
106106
opal_list_remove_first (&mpool_rgpusm->lru_list);
107107
if (NULL == old_reg) {
108+
opal_output_verbose(10, mca_mpool_rgpusm_component.output,
109+
"RGPUSM: The LRU list is empty. There is nothing to deregister");
108110
return false;
109111
}
110112

@@ -121,6 +123,9 @@ static inline bool mca_mpool_rgpusm_deregister_lru (mca_mpool_base_module_t *mpo
121123
the deregistration fails to occur as we no longer have
122124
a reference to it. Is this possible? */
123125
if (OPAL_SUCCESS != rc) {
126+
opal_output_verbose(10, mca_mpool_rgpusm_component.output,
127+
"RGPUSM: Failed to deregister the memory addr=%p, size=%d",
128+
old_reg->base, (int)(old_reg->bound - old_reg->base + 1));
124129
return false;
125130
}
126131

@@ -419,6 +424,8 @@ int mca_mpool_rgpusm_register(mca_mpool_base_module_t *mpool, void *addr,
419424
* is MPI_ERR_OUT_OF_RESOURCES, but everything is stuck at
420425
* that point. Therefore, just error out completely.
421426
*/
427+
opal_output_verbose(10, mca_mpool_rgpusm_component.output,
428+
"RGPUSM: Failed to register addr=%p, size=%d", addr, (int)size);
422429
return OPAL_ERROR;
423430
}
424431

@@ -495,6 +502,9 @@ int mca_mpool_rgpusm_deregister(struct mca_mpool_base_module_t *mpool,
495502
{
496503
/* if leave_pinned is set don't deregister memory, but put it
497504
* on LRU list for future use */
505+
opal_output_verbose(20, mca_mpool_rgpusm_component.output,
506+
"RGPUSM: Deregister: addr=%p, size=%d: cacheable and pinned, leave in cache, PUSH IN LRU",
507+
reg->base, (int)(reg->bound - reg->base + 1));
498508
opal_list_prepend(&mpool_rgpusm->lru_list, (opal_list_item_t*)reg);
499509
} else {
500510
/* Remove from rcache first */

0 commit comments

Comments
 (0)