 #ifdef ENABLE_MPI
 
 #include <thrust/iterator/zip_iterator.h>
+#include <thrust/iterator/retag.h>
 #include <thrust/iterator/counting_iterator.h>
 #include <thrust/functional.h>
 #include <thrust/device_ptr.h>

        }
    };


/*! \param N Number of local particles
    \param d_pos Device array of particle positions


    // partition input into two outputs (local particles and removed particles)
    thrust::pair<clipped_range<out_it_1>::iterator, out_it_2> res =
        thrust::stable_partition_copy(thrust::cuda::par(alloc), in, in+N, clip.begin(),
        out_2, combined_tuple_select_rtag_gpu(d_rtag,NOT_LOCAL));

    // return elements written to output stream
    return res.first - clip.begin();
