             fp[I_q + 1] -= gupdate;
         }   
         
-        //__syncthreads(); 
+        __threadfence_block(); 
     } 
 
     __syncthreads();

                for(mq = 0; mq < meqn; mq++)
                {
                    I_q = I + mq*zs;
                    cqxx = fabs(s[mw])*(1.0 - fabs(s[mw])*dtdx)*wave[mq];

                    fm[I_q] += 0.5*cqxx;   
                    fp[I_q] += 0.5*cqxx;  

            gp[I_q - 1] -= gupdate;   
        }            

        __threadfence_block();

        for(mq = 0; mq < meqn; mq++)
        {
