瀏覽代碼

mpi/tests/helper.h: new macro FPRINTF_MPI to display a message along with the rank number

Nathalie Furmento 12 年之前
父節點
當前提交
9b92d68703
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      mpi/tests/helper.h

+ 4 - 0
mpi/tests/helper.h

@@ -19,4 +19,8 @@
 #define STARPU_TEST_SKIPPED 77
 
 #define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
+#define FPRINTF_MPI(fmt, args ...) do { if (!getenv("STARPU_SILENT")) { \
+    						int _disp_rank; MPI_Comm_rank(MPI_COMM_WORLD, &_disp_rank);       \
+                                                fprintf(stderr, "[%d][starpu_mpi][%s] " fmt , _disp_rank, __func__ ,##args); \
+                                                fflush(stderr); }} while(0);