diff --git a/tests/benchmarks/tnl-cuda-benchmarks.h b/tests/benchmarks/tnl-cuda-benchmarks.h
index 2c11b5bc7636929c68112b62918a426787574f1b..78f8778a6eb464d46de7af9067a8b8ebfc80ee16 100644
--- a/tests/benchmarks/tnl-cuda-benchmarks.h
+++ b/tests/benchmarks/tnl-cuda-benchmarks.h
@@ -196,10 +196,13 @@ int main( int argc, char* argv[] )
    cout << "bandwidth: " << bandwidth << " GB/sec, time: " << timer.getTime() << " sec." << endl;
    cout << "CPU/GPU speedup: " << timeHost / timeDevice << endl;
 
+   HostVector auxHostVector;
+   auxHostVector.setLike( deviceVector );
+   auxHostVector = deviceVector;
    for( int i = 0; i < size; i++ )
-      if( hostVector.getElement( i ) != deviceVector.getElement( i ) )
+      if( hostVector.getElement( i ) != auxHostVector.getElement( i ) )
       {
-         cerr << "Error in prefix sum at position " << i << ":  " << hostVector.getElement( i ) << " != " << deviceVector.getElement( i ) << endl;
+         cerr << "Error in prefix sum at position " << i << ":  " << hostVector.getElement( i ) << " != " << auxHostVector.getElement( i ) << endl;
       }
 
    return EXIT_SUCCESS;