[C-mpi-commits] SF.net SVN: c-mpi:[16] test/gossip
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-20 16:02:50
|
Revision: 16
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=16&view=rev
Author: jmwozniak
Date: 2010-04-20 16:02:43 +0000 (Tue, 20 Apr 2010)
Log Message:
-----------
More helpful names.
Added Paths:
-----------
test/gossip/test-env.c
test/gossip/test-masks.c
Removed Paths:
-------------
test/gossip/test01.c
test/gossip/test02.c
Copied: test/gossip/test-env.c (from rev 15, test/gossip/test02.c)
===================================================================
--- test/gossip/test-env.c (rev 0)
+++ test/gossip/test-env.c 2010-04-20 16:02:43 UTC (rev 16)
@@ -0,0 +1,33 @@
+/**
+ * Test gossip functionality.
+ * */
+
+#include <mpi.h>
+#include <gs-debug.h>
+
+int main(int argc, char* argv[])
+{
+ MPI_Init(&argc, &argv);
+
+ printf(
+"This test program will print an example debugging message on the final\n"
+"line of output if the CMPI_DEBUG_MASK environment variable is set to include\n"
+"\"example\" or \"all\" in its comma separated list of masks:\n"
+ );
+
+ gossip_debug_init();
+
+ gossip_debug(MASK_EXAMPLE, "Example debugging message.\n");
+
+ MPI_Finalize();
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Property changes on: test/gossip/test-env.c
___________________________________________________________________
Added: svn:mergeinfo
+
Copied: test/gossip/test-masks.c (from rev 14, test/gossip/test01.c)
===================================================================
--- test/gossip/test-masks.c (rev 0)
+++ test/gossip/test-masks.c 2010-04-20 16:02:43 UTC (rev 16)
@@ -0,0 +1,75 @@
+
+/**
+ * Test gossip functionality.
+ * */
+
+#include <mpi.h>
+#include <gossip.h>
+
+#define MASK1 ((uint64_t)1 << 0)
+#define MASK2 ((uint64_t)1 << 1)
+#define MASK3 ((uint64_t)1 << 2)
+
+int main(int argc, char* argv[])
+{
+ MPI_Init(&argc, &argv);
+
+/* examples of configuring gossip */
+/*******************************************************************/
+
+ /* control where the output goes, if desired */
+
+ /* stderr by default, no need to enable */
+ /* gossip_enable_stderr(); */
+ /* to log to a particular file */
+ /* gossip_enable_file("test.log", "w"); */
+ /* to log to syslog */
+ /* gossip_enable_syslog(LOG_USER); */
+
+ /* control what timestamp format to use */
+
+ /* usec granularity */
+ /* gossip_set_logstamp(GOSSIP_LOGSTAMP_USEC); */
+ /* turn off timestamp */
+ /* gossip_set_logstamp(GOSSIP_LOGSTAMP_NONE); */
+ /* use prettier, lower granularity for system services */
+ /* gossip_set_logstamp(GOSSIP_LOGSTAMP_DATETIME); */
+ /* like usec, but also shows thread number */
+ /* gossip_set_logstamp(GOSSIP_LOGSTAMP_THREAD); */
+
+ /* like usec, but also shows mpi rank, default for grayskull */
+ /* gossip_set_logstamp(GOSSIP_LOGSTAMP_MPI); */
+
+ /* control what mask levels get printed, one and two for this test */
+ /* all masks off by default */
+ gossip_set_debug_mask(1, MASK1|MASK2);
+
+
+/* examples of internal code using gossip */
+/*******************************************************************/
+
+ gossip_err("Error message.\n");
+ gossip_err("Error message, printf style: %d.\n", 12345);
+ gossip_lerr("Error message, with line info.\n");
+
+ /* examples of printing debugging messages */
+ gossip_debug(MASK1, "Debug mask 1.\n");
+ gossip_debug(MASK2, "Debug mask 2.\n");
+ gossip_debug(MASK3, "Debug mask 3.\n");
+
+ gossip_ldebug(MASK1, "Debug mask 1, with line info.\n");
+ gossip_ldebug(MASK2, "Debug mask 2, with line info.\n");
+ gossip_ldebug(MASK3, "Debug mask 3, with line info.\n");
+
+ MPI_Finalize();
+ return 0;
+}
+
+/*
+ * Local variables:
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ *
+ * vim: ts=8 sts=4 sw=4 expandtab
+ */
Property changes on: test/gossip/test-masks.c
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: test/gossip/test01.c
===================================================================
--- test/gossip/test01.c 2010-04-20 16:01:22 UTC (rev 15)
+++ test/gossip/test01.c 2010-04-20 16:02:43 UTC (rev 16)
@@ -1,75 +0,0 @@
-
-/**
- * Test gossip functionality.
- * */
-
-#include <mpi.h>
-#include <gossip.h>
-
-#define MASK1 ((uint64_t)1 << 0)
-#define MASK2 ((uint64_t)1 << 1)
-#define MASK3 ((uint64_t)1 << 2)
-
-int main(int argc, char* argv[])
-{
- MPI_Init(&argc, &argv);
-
-/* examples of configuring gossip */
-/*******************************************************************/
-
- /* control where the output goes, if desired */
-
- /* stderr by default, no need to enable */
- /* gossip_enable_stderr(); */
- /* to log to a particular file */
- /* gossip_enable_file("test.log", "w"); */
- /* to log to syslog */
- /* gossip_enable_syslog(LOG_USER); */
-
- /* control what timestamp format to use */
-
- /* usec granularity */
- /* gossip_set_logstamp(GOSSIP_LOGSTAMP_USEC); */
- /* turn off timestamp */
- /* gossip_set_logstamp(GOSSIP_LOGSTAMP_NONE); */
- /* use prettier, lower granularity for system services */
- /* gossip_set_logstamp(GOSSIP_LOGSTAMP_DATETIME); */
- /* like usec, but also shows thread number */
- /* gossip_set_logstamp(GOSSIP_LOGSTAMP_THREAD); */
-
- /* like usec, but also shows mpi rank, default for grayskull */
- /* gossip_set_logstamp(GOSSIP_LOGSTAMP_MPI); */
-
- /* control what mask levels get printed, one and two for this test */
- /* all masks off by default */
- gossip_set_debug_mask(1, MASK1|MASK2);
-
-
-/* examples of internal code using gossip */
-/*******************************************************************/
-
- gossip_err("Error message.\n");
- gossip_err("Error message, printf style: %d.\n", 12345);
- gossip_lerr("Error message, with line info.\n");
-
- /* examples of printing debugging messages */
- gossip_debug(MASK1, "Debug mask 1.\n");
- gossip_debug(MASK2, "Debug mask 2.\n");
- gossip_debug(MASK3, "Debug mask 3.\n");
-
- gossip_ldebug(MASK1, "Debug mask 1, with line info.\n");
- gossip_ldebug(MASK2, "Debug mask 2, with line info.\n");
- gossip_ldebug(MASK3, "Debug mask 3, with line info.\n");
-
- MPI_Finalize();
- return 0;
-}
-
-/*
- * Local variables:
- * c-indent-level: 4
- * c-basic-offset: 4
- * End:
- *
- * vim: ts=8 sts=4 sw=4 expandtab
- */
Deleted: test/gossip/test02.c
===================================================================
--- test/gossip/test02.c 2010-04-20 16:01:22 UTC (rev 15)
+++ test/gossip/test02.c 2010-04-20 16:02:43 UTC (rev 16)
@@ -1,33 +0,0 @@
-/**
- * Test gossip functionality.
- * */
-
-#include <mpi.h>
-#include <gs-debug.h>
-
-int main(int argc, char* argv[])
-{
- MPI_Init(&argc, &argv);
-
- printf(
-"This test program will print an example debugging message on the final\n"
-"line of output if the CMPI_DEBUG_MASK environment variable is set to include\n"
-"\"example\" or \"all\" in its comma separated list of masks:\n"
- );
-
- gossip_debug_init();
-
- gossip_debug(MASK_EXAMPLE, "Example debugging message.\n");
-
- MPI_Finalize();
- return 0;
-}
-
-/*
- * Local variables:
- * c-indent-level: 4
- * c-basic-offset: 4
- * End:
- *
- * vim: ts=8 sts=4 sw=4 expandtab
- */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|