[mpich2-commits] r5524 - mpich2/trunk/src/util/mem
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Wed Oct 21 16:33:04 CDT 2009
Author: goodell
Date: 2009-10-21 16:33:04 -0500 (Wed, 21 Oct 2009)
New Revision: 5524
Modified:
mpich2/trunk/src/util/mem/handlemem.c
Log:
Define MPIU_Handle_get_kind_str unconditionally.
Another good catch by Darius.
No reviewer.
Modified: mpich2/trunk/src/util/mem/handlemem.c
===================================================================
--- mpich2/trunk/src/util/mem/handlemem.c 2009-10-21 21:33:03 UTC (rev 5523)
+++ mpich2/trunk/src/util/mem/handlemem.c 2009-10-21 21:33:04 UTC (rev 5524)
@@ -473,6 +473,31 @@
}
}
+/* returns the name of the handle kind for debugging/logging purposes */
+const char *MPIU_Handle_get_kind_str(int kind)
+{
+#define mpiu_name_case_(name_) case MPID_##name_: return (#name_)
+ switch (kind) {
+ mpiu_name_case_(COMM);
+ mpiu_name_case_(GROUP);
+ mpiu_name_case_(DATATYPE);
+ mpiu_name_case_(FILE);
+ mpiu_name_case_(ERRHANDLER);
+ mpiu_name_case_(OP);
+ mpiu_name_case_(INFO);
+ mpiu_name_case_(WIN);
+ mpiu_name_case_(KEYVAL);
+ mpiu_name_case_(ATTR);
+ mpiu_name_case_(REQUEST);
+ mpiu_name_case_(PROCGROUP);
+ mpiu_name_case_(VCONN);
+ mpiu_name_case_(GREQ_CLASS);
+ default:
+ return "unknown";
+ }
+#undef mpiu_name_case_
+}
+
/* style: allow:printf:5 sig:0 */
#ifdef MPICH_DEBUG_HANDLEALLOC
/* The following is a handler that may be added to finalize to test whether
@@ -575,31 +600,6 @@
return 0;
}
-/* returns the name of the handle kind for debugging/logging purposes */
-const char *MPIU_Handle_get_kind_str(int kind)
-{
-#define mpiu_name_case_(name_) case MPID_##name_: return (#name_)
- switch (kind) {
- mpiu_name_case_(COMM);
- mpiu_name_case_(GROUP);
- mpiu_name_case_(DATATYPE);
- mpiu_name_case_(FILE);
- mpiu_name_case_(ERRHANDLER);
- mpiu_name_case_(OP);
- mpiu_name_case_(INFO);
- mpiu_name_case_(WIN);
- mpiu_name_case_(KEYVAL);
- mpiu_name_case_(ATTR);
- mpiu_name_case_(REQUEST);
- mpiu_name_case_(PROCGROUP);
- mpiu_name_case_(VCONN);
- mpiu_name_case_(GREQ_CLASS);
- default:
- return "unknown";
- }
-#undef mpiu_name_case_
-}
-
static const char *MPIR_ObjectName( MPIU_Object_alloc_t *objmem )
{
return MPIU_Handle_get_kind_str(objmem->kind);
More information about the mpich2-commits
mailing list