From e8600bdc2a7062ec43c8512e6d36a7521531c53f Mon Sep 17 00:00:00 2001
From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz>
Date: Sun, 11 Dec 2011 11:56:35 +0000
Subject: [PATCH] Improving buildAll script. Small fix in RgCSR kernel.

---
 buildAll                    | 11 +++++++----
 src/matrix/tnlRgCSRMatrix.h |  6 +++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/buildAll b/buildAll
index f44119ab3b..245a1d1074 100755
--- a/buildAll
+++ b/buildAll
@@ -1,6 +1,9 @@
 #!/bin/bash
 
 INSTALL_PREFIX=${HOME}/local
+WITH_CUDA=yes
+CUDA_ARCHITECTURE=2.0
+VERBOSE=0
 
 CPUS=`grep -c processor /proc/cpuinfo`
 
@@ -16,13 +19,13 @@ then
 fi
 
 cd Debug
-cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${HOME}/local -DCUDA_ARCHITECTURE=1.2 -DWITH_CUDA=no
-make -j${CPUS} #VERBOSE=1
+cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${HOME}/local -DCUDA_ARCHITECTURE=${CUDA_ARCHITECTURE} -DWITH_CUDA=${WITH_CUDA}
+make -j${CPUS} #VERBOSE=${VERBOSE}
 make -j${CPUS} test
 make -j${CPUS} install
 
 cd ../Release
-cmake .. -DCMAKE_INSTALL_PREFIX=${HOME}/local -DCUDA_ARCHITECTURE=1.2 -DWITH_CUDA=no
-make -j${CPUS} #VERBOSE=1
+cmake .. -DCMAKE_INSTALL_PREFIX=${HOME}/local -DCUDA_ARCHITECTURE=${CUDA_ARCHITECTURE} -DWITH_CUDA=${WITH_CUDA}
+make -j${CPUS} #VERBOSE=${VERBOSE}
 make -j${CPUS} test
 make -j${CPUS} install
diff --git a/src/matrix/tnlRgCSRMatrix.h b/src/matrix/tnlRgCSRMatrix.h
index f4cc933eb8..83636c2f44 100644
--- a/src/matrix/tnlRgCSRMatrix.h
+++ b/src/matrix/tnlRgCSRMatrix.h
@@ -1107,9 +1107,9 @@ __global__ void tnlRgCSRMatrixAdpativeGroupSizeVectorProductKernel( const Index
    for( Index i = threadIndexInRow; i < nonzeros; i += threadsPerRow )
    {
       const Index column = columns[ pos ];
-      if( column == -1 )
-         printf( "* rowInMatrix = %d blockIdx. x = %d threadIdx. x = %d threadIndexInRow = %d i = %d \n",
-                rowInMatrix, blockIndex, threadIdx. x, threadIndexInRow, i );
+      //if( column == -1 )
+      //   printf( "* rowInMatrix = %d blockIdx. x = %d threadIdx. x = %d threadIndexInRow = %d i = %d \n",
+      //          rowInMatrix, blockIndex, threadIdx. x, threadIndexInRow, i );
       if( column != -1 )
          partialSums[ threadIdx. x ] += nonzeroElements[ pos ] * vec_x[ column ];
       //if( rowInMatrix == 0 )
-- 
GitLab