]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Fix test warnings and output 49/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 22 May 2020 21:11:16 +0000 (23:11 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 30 May 2020 20:57:35 +0000 (22:57 +0200)
parallel_in_time/test/test_braid.cc
parallel_in_time/test/test_braid.output

index 61e006a5a32be9a49cf40c9bfccad5bbac5dfdde..dffb6d74738ec1411539d6375a05ff8a885b259a 100644 (file)
@@ -25,6 +25,7 @@ int main(int argc, char** argv)
                                                       my_Init,
                                                       my_Access,
                                                       my_Free);
+  (void)init_access_result;
 
   braid_Int clone_result = braid_TestClone(app,
                                            comm,
@@ -34,6 +35,7 @@ int main(int argc, char** argv)
                                            my_Access,
                                            my_Free,
                                            my_Clone);
+  (void)clone_result;
 
   braid_Int sum_result = braid_TestSum(app,
                                        comm,
@@ -44,6 +46,7 @@ int main(int argc, char** argv)
                                        my_Free,
                                        my_Clone,
                                        my_Sum);
+  (void)sum_result;
 
   braid_Int norm_result = braid_TestSpatialNorm(app,
                                                 comm,
@@ -54,6 +57,7 @@ int main(int argc, char** argv)
                                                 my_Clone,
                                                 my_Sum,
                                                 my_SpatialNorm);
+  (void)norm_result;
 
   braid_Int buf_result = braid_TestBuf(app,
                                        comm,
@@ -66,6 +70,8 @@ int main(int argc, char** argv)
                                        my_BufSize,
                                        my_BufPack,
                                        my_BufUnpack);
+  (void)buf_result;
+
   //     /* Create spatial communicator for wrapper-tests */
   //     braid_SplitCommworld(&comm, 1, &comm_x, &comm_t);
 // 
index 1ae28cad5eb6bb9c28b671bef81c0f94aad69488..e1b73fca96bc27eee7eb78fdbbb6c7fad04bacd9 100644 (file)
@@ -4,6 +4,9 @@ Starting braid_TestInitAccess
    braid_TestInitAccess:   Starting Test 1
    braid_TestInitAccess:   u = init(t=2.00e-01)
    braid_TestInitAccess:   access(u) 
+
+cycle cells dofs     L2        H1      Linfty   
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
    braid_TestInitAccess:   check output: wrote u for initial condition at t=2.00e-01. 
 
    braid_TestInitAccess:   free(u) 
@@ -15,7 +18,16 @@ Starting braid_TestClone
    braid_TestClone:   u = init(t=2.00e-01)
    braid_TestClone:   v = clone(u)
    braid_TestClone:   access(u)
+
+cycle cells dofs     L2        H1      Linfty   
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
    braid_TestClone:   access(v)
+
+cycle cells dofs     L2        H1      Linfty   
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
    braid_TestClone:   check output:  wrote u and v for initial condition at t=2.00e-01.
 
    braid_TestClone:   free(u)
@@ -29,12 +41,33 @@ Starting braid_TestSum
    braid_TestSum:   v = clone(u)
    braid_TestSum:   v = u - v
    braid_TestSum:   access(v)
+
+cycle cells dofs     L2        H1      Linfty   
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 3.225e-04 2.865e-03 3.723e-04 
    braid_TestSum:   check output:  v should equal the zero vector
 
    braid_TestSum:   Starting Test 2
    braid_TestSum:   v = 2*u + v
    braid_TestSum:   access(v)
+
+cycle cells dofs     L2        H1      Linfty   
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 3.225e-04 2.865e-03 3.723e-04 
+    0 12288 12545 1.732e+00 1.539e+01 2.003e+00 
    braid_TestSum:   access(u)
+
+cycle cells dofs     L2        H1      Linfty   
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
+    0 12288 12545 3.225e-04 2.865e-03 3.723e-04 
+    0 12288 12545 1.732e+00 1.539e+01 2.003e+00 
+    0 12288 12545 8.657e-01 7.696e+00 1.001e+00 
    braid_TestSum:   check output:  v should equal 2*u 
 
    braid_TestSum:   free(u)
@@ -46,7 +79,6 @@ Starting braid_TestSpatialNorm
    braid_TestSpatialNorm:   Starting Test 1
    braid_TestSpatialNorm:   u = init(t=2.00e-01)
    braid_TestSpatialNorm:   spatialnorm(u) 
-   braid_TestSpatialNorm:   Warning:  spatialnorm(u) = 0.0
    braid_TestSpatialNorm:   v = clone(u)
    braid_TestSpatialNorm:   v = u - v 
    braid_TestSpatialNorm:   spatialnorm(v) 
@@ -59,8 +91,8 @@ Starting braid_TestSpatialNorm
    braid_TestSpatialNorm:   w = u + w 
    braid_TestSpatialNorm:   spatialnorm(u)
    braid_TestSpatialNorm:   spatialnorm(w)
-   braid_TestSpatialNorm:   Test 2 Failed, Likely due to u = 0
-   braid_TestSpatialNorm:   actual output:    spatialnorm(w) / spatialnorm(u) = 0.00e+00 / 0.00e+00 = -nan 
+   braid_TestSpatialNorm:   Test 2 Passed
+   braid_TestSpatialNorm:   actual output:    spatialnorm(w) / spatialnorm(u) = 1.13e+02 / 5.67e+01 = 2.00e+00 
    braid_TestSpatialNorm:   expected output:  spatialnorm(w) / spatialnorm(u) = 2.0 
 
    braid_TestSpatialNorm:   Starting Test 3
@@ -69,21 +101,20 @@ Starting braid_TestSpatialNorm
    braid_TestSpatialNorm:   w = 0.0*u + 0.5*w 
    braid_TestSpatialNorm:   spatialnorm(u)
    braid_TestSpatialNorm:   spatialnorm(w)
-   braid_TestSpatialNorm:   Test 3 Failed, Likely due to u = 0
-   braid_TestSpatialNorm:   actual output:    spatialnorm(w) / spatialnorm(u) = 0.00e+00 / 0.00e+00 = -nan 
+   braid_TestSpatialNorm:   Test 3 Passed
+   braid_TestSpatialNorm:   actual output:    spatialnorm(w) / spatialnorm(u) = 2.83e+01 / 5.67e+01 = 5.00e-01 
    braid_TestSpatialNorm:   expected output:  spatialnorm(w) / spatialnorm(u) = 0.5 
 
    braid_TestSpatialNorm:   free(u)
    braid_TestSpatialNorm:   free(v)
    braid_TestSpatialNorm:   free(w)
-Finished braid_TestSpatialNorm: some tests failed, possibly due to u = 0
+Finished braid_TestSpatialNorm: all tests passed successfully
 
 Starting braid_TestBuf
 
    braid_TestBuf:   Starting Test 1
    braid_TestBuf:   u = init(t=2.00e-01)
    braid_TestBuf:   spatialnorm(u) 
-   braid_TestBuf:   Warning:  spatialnorm(u) = 0.0
    braid_TestBuf:   size = bufsize()
    braid_TestBuf:   buffer = malloc(size)
    braid_TestBuf:   buffer = bufpack(u, buffer))

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.