Commit b740f688 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing compiler optimizations in cmake.

parent 44e13845
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ else()
    set( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/Release/bin)
    #set( CXX_OPTIMIZE_FLAGS "-O3")
    OptimizeForArchitecture()
    AddCompilerFlag( "-O3" )
endif()

#####
+2 −2
Original line number Diff line number Diff line
@@ -15,12 +15,12 @@ fi

cd Debug
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${HOME}/local -DCUDA_ARCHITECTURE=2.0 -DWITH_CUDA=yes
make -j${CPUS} #VERBOSE=0
make -j${CPUS} VERBOSE=1
make -j${CPUS} test
make -j${CPUS} install

cd ../Release
cmake .. -DCMAKE_INSTALL_PREFIX=${HOME}/local -DCUDA_ARCHITECTURE=2.0 -DWITH_CUDA=yes
make -j${CPUS} #VERBOSE=0
make -j${CPUS} VERBOSE=1
make -j${CPUS} test
make -j${CPUS} install
+3 −1
Original line number Diff line number Diff line
@@ -2,13 +2,15 @@ INCLUDE_DIRECTORIES( low-level )

add_subdirectory( low-level )

set (headers tnlAssert.h  
set (headers tnlArray.h
             tnlAssert.h               
    	     tnlCurve.h 
    	     tnlCudaSupport.h
		     tnlDataElement.h
		     tnlFile.h 
		     tnlFlopsCounter.h 
		     tnlList.h 
		     tnlLongVector.h
		     tnlLongVectorBase.h 
		     tnlLongVectorHost.h 
		     tnlLongVectorCUDA.h  
+6 −6
Original line number Diff line number Diff line
@@ -564,9 +564,9 @@ void tnlCSRMatrix< Real, Device, Index > :: vectorProduct( const tnlLongVector<

   if( ! backwardSpMV )
   {
#ifdef HAVE_OPENMP
#pragma omp parallel for
#endif
//#ifdef HAVE_OPENMP
//#pragma omp parallel for
//#endif
      for( Index row = 0; row < this -> size; row ++ )
      {
         Real product( 0.0 );
@@ -582,9 +582,9 @@ void tnlCSRMatrix< Real, Device, Index > :: vectorProduct( const tnlLongVector<
   }
   else
   {
#ifdef HAVE_OPENMP
#pragma omp parallel for
#endif
//#ifdef HAVE_OPENMP
//#pragma omp parallel for
//#endif
      for( Index row = 0; row < this -> size; row ++ )
      {
         Real product( 0.0 );
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ SET( headers tnlBICGSolver.h
             tnlILUPreconditioner.h
             tnlMatrixSolver.h
             tnlMersonSolver.h
             tnlPETSCPreconditioner.h
             tnlPETSCSolver.h
             tnlPreconditioner.h
             tnlSORSolver.h
Loading