CkIO test: close the file, too
authorPhil Miller <mille121@illinois.edu>
Wed, 24 Jul 2013 23:26:18 +0000 (18:26 -0500)
committerPhil Miller <mille121@illinois.edu>
Tue, 20 Aug 2013 23:29:01 +0000 (18:29 -0500)
tests/charm++/io/iotest.ci

index d76a720aee38be33332b2b1356fac7fa99cc538e..1be757835e2bf897acca89f761c26d9e4f4c05e9 100644 (file)
@@ -24,13 +24,19 @@ mainmodule iotest {
       when test_written[13](CkReductionMsg *m) serial {
         CkPrintf("Main saw write done\n");
         // Read file and validate contents
-
+        CkCallback cb(CkIndex_Main::closed(0), thisProxy);
+        cb.setRefnum(17);
+        Ck::IO::close(f, cb);
+      }
+      when closed[17](CkReductionMsg *m) serial {
+        CkPrintf("Main saw close done\n");
         CkExit();
       }
     };
 
     entry void start_write(Ck::IO::SessionReadyMsg *m);
     entry void test_written(CkReductionMsg *m);
+    entry void closed(CkReductionMsg *m);
   };
 
   array [1D] test {