     PPMP_cuda<<<dim1dGrid,dim1dBlock>>>(dev_conserved_half, Q_Ly, Q_Ry, nx_s, ny_s, nz_s, n_ghost, dy, dt, gama, 1, n_fields);
     PPMP_cuda<<<dim1dGrid,dim1dBlock>>>(dev_conserved_half, Q_Lz, Q_Rz, nx_s, ny_s, nz_s, n_ghost, dz, dt, gama, 2, n_fields);
     #endif //PPMP
+    CudaCheckError();
     #ifdef PPMC
-    #ifdef TIME
-    cudaEventRecord(start, 0);
-    #endif //TIME 
     PPMC_cuda<<<dim1dGrid,dim1dBlock>>>(dev_conserved_half, Q_Lx, Q_Rx, nx_s, ny_s, nz_s, n_ghost, dx, dt, gama, 0, n_fields);
     CudaCheckError();
-    #ifdef TIME
-    cudaEventRecord(stop, 0);
-    cudaEventSynchronize(stop);
-    cudaEventElapsedTime(&elapsedTime, start, stop);
-    //printf("x ppm: %5.3f ms\n", elapsedTime);
-    //fflush(stdout);
-    ppmx += elapsedTime;
-    cudaEventRecord(start, 0);
-    #endif //TIME 
     PPMC_cuda<<<dim1dGrid,dim1dBlock>>>(dev_conserved_half, Q_Ly, Q_Ry, nx_s, ny_s, nz_s, n_ghost, dy, dt, gama, 1, n_fields);
     CudaCheckError();
-    #ifdef TIME
-    cudaEventRecord(stop, 0);
-    cudaEventSynchronize(stop);
-    cudaEventElapsedTime(&elapsedTime, start, stop);
-    //printf("y ppm: %5.3f ms\n", elapsedTime);
-    //fflush(stdout);
-    ppmy += elapsedTime;
-    cudaEventRecord(start, 0);
-    #endif //TIME 
     PPMC_cuda<<<dim1dGrid,dim1dBlock>>>(dev_conserved_half, Q_Lz, Q_Rz, nx_s, ny_s, nz_s, n_ghost, dz, dt, gama, 2, n_fields);
     CudaCheckError();
-    #ifdef TIME
-    cudaEventRecord(stop, 0);
-    cudaEventSynchronize(stop);
-    cudaEventElapsedTime(&elapsedTime, start, stop);
-    //printf("z ppm: %5.3f ms\n", elapsedTime);
-    //fflush(stdout);
-    ppmz += elapsedTime;
-    #endif //TIME    
     #endif //PPMC
-    CudaCheckError();
     
 
     // Step 5: Calculate the fluxes again

  dim3 dim1dGrid(ngrid, 1, 1);
  //  number of threads per 1D block   
  dim3 dim1dBlock(TPB, 1, 1);
  #ifdef TIME
  cudaEventRecord(stop, 0);
  cudaEventSynchronize(stop);
  cudaEventElapsedTime(&elapsedTime, start, stop);
  other += elapsedTime;
  #endif //TIME

  // Set up pointers for the location to copy from and to
  if (block_tot == 1) {

#include"subgrid_routines_3D.h"
#include"io.h"


__global__ void Update_Conserved_Variables_3D_half(Real *dev_conserved, Real *dev_conserved_half, Real *dev_F_x, Real *dev_F_y,  Real *dev_F_z, int nx, int ny, int nz, int n_ghost, Real dx, Real dy, Real dz, Real dt, Real gamma, int n_fields);

