[PATCH] D18595: MPI-Checker test helper

Alexander Droste via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 06:59:50 PDT 2016


Alexander_Droste created this revision.
Alexander_Droste added a reviewer: zaks.anna.
Alexander_Droste added subscribers: dcoughlin, xazax.hun, cfe-commits.

This file contains definitions that help to test MPI-Checker functionality,
on functions not visible to the analyzer, as they are defined in a distinct
translation unit. The main MPI-Checker testfile is MPIChecker.cpp.


http://reviews.llvm.org/D18595

Files:
  test/Analysis/MPICheckerHelper.cpp

Index: test/Analysis/MPICheckerHelper.cpp
===================================================================
--- test/Analysis/MPICheckerHelper.cpp
+++ test/Analysis/MPICheckerHelper.cpp
@@ -0,0 +1,15 @@
+// This file contains definitions that help to test MPI-Checker functionality,
+// on functions not visible to the analyzer, as they are defined in a distinct
+// translation unit. The main MPI-Checker testfile is MPIChecker.cpp.
+
+#include "MPIMock.h"
+
+void callNonblockingExtern(MPI_Request *req) {
+  static double buf = 0;
+  MPI_Ireduce(MPI_IN_PLACE, &buf, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD,
+              req);
+}
+
+void callWaitExtern(MPI_Request *req) {
+  MPI_Wait(req, MPI_STATUS_IGNORE);
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18595.52051.patch
Type: text/x-patch
Size: 721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160330/5e527008/attachment-0001.bin>


More information about the cfe-commits mailing list