1
1
openmpi/ompi/mca/coll/sm/coll_sm_allreduce.c
Jeff Squyres 7bab4ed269 bunches of updates
- finally added "in use" flags -- one flag protects a set of segments
- these flags now used in bcast to protect (for example) when a
  message is so long that the root loops around the segments and has
  to re-use old segments -- now it knows that it has to wait until the
  non-root processes have finished with that set of segments before it
  can start using them
- implement allreduce as a reduce followed by a bcast (per discussion
  with rich)
- removed some redundant data on various data structures
- implemented query MCA param ("coll_sm_shared_mem_used_data") that
  tells you how much shared memory will be used for a given set of MCA
  params (e.g., number of segments, etc.).  For example:

  ompi_info --mca coll_sm_info_num_procs 4 --param coll sm | \
	    grep shared_mem_used_data

  tells you that for the default MCA param values (as of r7172), for 4
  processes, sm will use 548864 bytes of shared memory for its data
  transfer section
- remove a bunch of .c files from the Makefile.am that aren't
  implemented yet (i.e., all they do is return ERR_NOT_IMPLEMENTED)

Now on to the big Altix to test that this stuff really works...

This commit was SVN r7205.

The following SVN revision numbers were found above:
  r7172 --> open-mpi/ompi@bc72a7722b
2005-09-06 21:41:55 +00:00

41 строка
1.3 KiB
C

/*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file */
#include "ompi_config.h"
#include "ompi/include/constants.h"
#include "coll_sm.h"
/**
* Shared memory allreduce.
*
* For the moment, all we're doing is a reduce to root==0 and then a
* broadcast. It is possible that we'll do something better someday.
*/
int mca_coll_sm_allreduce_intra(void *sbuf, void *rbuf, int count,
struct ompi_datatype_t *dtype,
struct ompi_op_t *op,
struct ompi_communicator_t *comm)
{
int ret;
ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0, comm);
return (ret == OMPI_SUCCESS) ?
mca_coll_sm_bcast_intra(rbuf, count, dtype, 0, comm) : ret;
}