X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a3848e5ea6b2305d6059c89705edaccbec356455..3b013fc09cb58be09f9f8d3f3a8161cb92bdbb84:/src/smpi/colls/allgatherv-ompi-bruck.c diff --git a/src/smpi/colls/allgatherv-ompi-bruck.c b/src/smpi/colls/allgatherv-ompi-bruck.c index 420f4302fd..3ea3c011d6 100644 --- a/src/smpi/colls/allgatherv-ompi-bruck.c +++ b/src/smpi/colls/allgatherv-ompi-bruck.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + /* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology @@ -10,15 +16,11 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009 University of Houston. All rights reserved. - * $COPYRIGHT$ * * Additional copyrights may follow - * - * $HEADER$ */ #include "colls_private.h" -#define MCA_COLL_BASE_TAG_ALLGATHERV 444 /* * ompi_coll_tuned_allgatherv_intra_bruck * @@ -87,7 +89,7 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount, int *new_scounts = NULL, *new_sdispls = NULL; ptrdiff_t slb, rlb, sext, rext; char *tmpsend = NULL, *tmprecv = NULL; - MPI_Datatype new_rdtype, new_sdtype; + MPI_Datatype new_rdtype = MPI_DATATYPE_NULL, new_sdtype = MPI_DATATYPE_NULL; size = smpi_comm_size(comm); rank = smpi_comm_rank(comm); @@ -121,9 +123,6 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount, - blockcount doubles until the last step when only the remaining data is exchanged. */ - blockcount = 1; - tmpsend = (char*) rbuf; - new_rcounts = (int*) calloc(4*size, sizeof(int)); new_rdispls = new_rcounts + size; new_scounts = new_rdispls + size; @@ -159,12 +158,12 @@ int smpi_coll_tuned_allgatherv_ompi_bruck(void *sbuf, int scount, /* Sendreceive */ smpi_mpi_sendrecv(rbuf, 1, new_sdtype, sendto, - MCA_COLL_BASE_TAG_ALLGATHERV, + COLL_TAG_ALLGATHERV, rbuf, 1, new_rdtype, recvfrom, - MCA_COLL_BASE_TAG_ALLGATHERV, + COLL_TAG_ALLGATHERV, comm, MPI_STATUS_IGNORE); - smpi_datatype_free(&new_sdtype); - smpi_datatype_free(&new_rdtype); + smpi_datatype_unuse(new_sdtype); + smpi_datatype_unuse(new_rdtype); }