 
         my_cuda_safe(cudaMemcpy(dev_mat_D, h_mat_D, n_CI_bytes, cudaMemcpyHostToDevice),"mem_D");
     
+
         // still use 1T1CI
         //grid_size.x = n_combi / block_size.x + (n_combi % block_size.x ? 1 : 0);
         grid_size.y = 1;

             n_combi, dev_start_contr, dev_end_contr, dev_eri);
    }

    t1 = clock();
    time_in_sec = (t1 - t0) / (double)CLOCKS_PER_SEC;
    time_txt += "Time_2e_GPU   = " + std::to_string(time_in_sec) + " sec\n";
    time_total += time_in_sec;


    // copy the results back to host
    my_cuda_safe(cudaMemcpy(h_eri, dev_eri, n_ERI_bytes, cudaMemcpyDeviceToHost),"mem_eri"); 

    t0 = clock();
    time_in_sec = (t0 - t1) / (double)CLOCKS_PER_SEC;
    time_txt += "Time_2e_HMem  = " + std::to_string(time_in_sec) + " sec\n";
    time_total += time_in_sec;



    std::cout << time_txt;
    std::cout << "Total time used " << time_total << " sec\n";

    std::cout << "Mat_J time used " << time_mat_J << " sec\n";


    //====== the end of program ========

