From 13a193f0a42417ff901f99ea3791f3a41c3932d7 Mon Sep 17 00:00:00 2001
From: Lukas Cejka <lukas.ostatek@gmail.com>
Date: Sun, 17 Mar 2019 13:46:54 +0100
Subject: [PATCH] Added FIXMEs to observed errors when launched without
 parameters or with '--help'. Commented out result comparison.

---
 src/Benchmarks/SpMV/spmv.h               |  4 ++--
 src/Benchmarks/SpMV/tnl-benchmark-spmv.h | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/Benchmarks/SpMV/spmv.h b/src/Benchmarks/SpMV/spmv.h
index 413eeec44f..7b76df1f72 100644
--- a/src/Benchmarks/SpMV/spmv.h
+++ b/src/Benchmarks/SpMV/spmv.h
@@ -247,7 +247,7 @@ benchmarkSpMV( Benchmark & benchmark,
     resultcuSPARSEDeviceVector2 = deviceVector2;
  #endif
     
-//#ifdef COMPARE_RESULTS
+#ifdef COMPARE_RESULTS
     // Difference between GPU (curent format) and GPU-cuSPARSE results
     Real cuSparseDifferenceAbsMax = resultDeviceVector2.differenceAbsMax( resultcuSPARSEDeviceVector2 );
     Real cuSparseDifferenceLpNorm = resultDeviceVector2.differenceLpNorm( resultcuSPARSEDeviceVector2, 1 );
@@ -284,7 +284,7 @@ benchmarkSpMV( Benchmark & benchmark,
 //    benchmark.addErrorMessage( CPUxGPU_absMax, 1 );
 //    benchmark.addErrorMessage( CPUxGPU_lpNorm, 1 );
     
-//#endif
+#endif
     
     std::cout << std::endl;
     return true;
diff --git a/src/Benchmarks/SpMV/tnl-benchmark-spmv.h b/src/Benchmarks/SpMV/tnl-benchmark-spmv.h
index 626e26032e..4ed66f8bc0 100644
--- a/src/Benchmarks/SpMV/tnl-benchmark-spmv.h
+++ b/src/Benchmarks/SpMV/tnl-benchmark-spmv.h
@@ -87,6 +87,16 @@ main( int argc, char* argv[] )
 
    setupConfig( conf_desc );
 
+   // FIXME: When ./tnl-benchmark-spmv-dbg is called without parameters:
+   //           * The guide on what parameters to use prints twice.
+   // FIXME: When ./tnl-benchmark-spmv-dbg is called with '--help':
+   //           * The guide on what parameter to use print once. 
+   //               But then it CRASHES due to segfault:
+//                    The program attempts to get unknown parameter openmp-enabled
+//                    Aborting the program.
+//                    terminate called after throwing an instance of 'int'
+//                    [1]    17156 abort (core dumped)  ~/tnl-dev/Debug/bin/./tnl-benchmark-spmv-dbg --help
+
    if( ! parseCommandLine( argc, argv, conf_desc, parameters ) ) {
       conf_desc.printUsage( argv[ 0 ] );
       return EXIT_FAILURE;
-- 
GitLab