     g_Mx = int((g_Lx) / (g_rcut));
     g_My = int((g_Ly) / (g_rcut));
     g_Mz = int((g_Lz) / (g_rcut));
-    g_Mx = std::min(g_Mx, (unsigned)30);
-    g_My = std::min(g_My, (unsigned)30);
-    g_Mz = std::min(g_Mz, (unsigned)30);
+    g_Mx = std::min(g_Mx, (unsigned)40);
+    g_My = std::min(g_My, (unsigned)40);
+    g_Mz = std::min(g_Mz, (unsigned)40);
+    g_Mx = std::max(g_Mx, (unsigned)1);
+    g_My = std::max(g_My, (unsigned)1);
+    g_Mz = std::max(g_Mz, (unsigned)1);
 
     // allocate bins
     unsigned int Nbins = g_Mx * g_My * g_Mz;

float g_rcut;
const unsigned int g_Nmax = 64;    // Maximum number of particles each cell can hold
const float tweak_dist = 0.1f;
const unsigned int g_neigh_max = 137;

//*************** data structures
float4 *gh_pos, *gd_pos;            // particle positions

    bmark_host_nlist<true, true>();*/
    
    bmark_device_nlist<false, false>();
    /*bmark_device_nlist<false, true>();
    bmark_device_nlist<true, false>();
    bmark_device_nlist<true, true>();*/
    
    printf("sorting bin_adj:\n");
    sort_bin_adj();
    
    //bmark_host_nlist<false, false>();
    /*bmark_host_nlist<false, true>();
    bmark_host_nlist<true, false>();
    bmark_host_nlist<true, true>();*/
    
    //bmark_device_nlist<false, false>();
    /*bmark_device_nlist<false, true>();
    bmark_device_nlist<true, false>();
    bmark_device_nlist<true, true>();*/
    
    free_data();
#endif
