 	int shft_wr; //Initialize the shift to the written row of temper.
 	int shft_rd; //Initialize the shift to the read row (opposite of written)
 	int logic_position;
-	int base = THREADBLK + 2;
+	int base = blockDim.x + 2;
 	//int height = THREADBLK/2;
 
     shLeft[tid] = right[gid];

	double t_eq = t_fullstep;

	// Call the kernels until you reach the iteration limit.
    if (cpu == 1)
    {
    	while(t_eq < t_end)
    	{

            cudaMemcpy(left,d_left,tpb*sizeof(REAL),cudaMemcpyDeviceToHost);

            CPU_diamond(right, left, tpb);
            wholeDiamond <<< bks-1,tpb,smem2 >>>(d_right,d_left,1);

            cudaMemcpy(d_right, right, tpb*sizeof(REAL), cudaMemcpyHostToDevice);
            cudaMemcpy(d_left, left, tpb*sizeof(REAL), cudaMemcpyHostToDevice);
