diff --git a/CUDA/init_gpu.cu b/CUDA/init_gpu.cu
index 8cf8af295820695ba266f47b8f293036f9bd7924..e3c55f5d3455ea5c904dce85cb3e23b6f5631e6e 100644
--- a/CUDA/init_gpu.cu
+++ b/CUDA/init_gpu.cu
@@ -10,14 +10,17 @@
 #include <fstream>
 
 void init_gpu(){
-	int device;
-  	cudaGetDevice(&device);
-  
-  	printf ("\n...................In the GPU launcher on the device %d...................\n", device); 
+	
 	int *q;
 	cudaMalloc((void **)&q, sizeof(int));
 	cudaFree(q);
 	sync_check("init_gpu");
+
+	int device;
+  	cudaGetDevice(&device);
+  	printf ("\n...................In the GPU launcher on the device %d...................\n", device); 
+	
+	sync_check("init_gpu");
 } 
 
 double timeval_diff(struct timeval *a, struct timeval *b){