+#ifdef HAVE_TRACING
+ int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
+ int i=0;
+ int size = smpi_comm_size(comm);
+ instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
+ extra->type = TRACING_ALLTOALLV;
+ extra->send_size = 0;
+ extra->recv_size = 0;
+ extra->recvcounts= xbt_malloc(size*sizeof(int));
+ extra->sendcounts= xbt_malloc(size*sizeof(int));
+
+ for(i=0; i< size; i++){//copy data to avoid bad free
+ extra->send_size += sendcounts[i];
+ extra->recv_size += recvcounts[i];
+
+ extra->sendcounts[i] = sendcounts[i];
+ extra->recvcounts[i] = recvcounts[i];
+ }
+ extra->num_processes = size;
+
+ extra->datatype1 = encode_datatype(sendtype);
+ extra->datatype2 = encode_datatype(recvtype);
+
+ TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
+#endif