Gitlab updates will be applied at 1:30pm, (17:30 UTC), today. No downtime expected.

Commit 5def6fa3 authored by whitlocb's avatar whitlocb

I merged the RC to the trunk.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6930 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2aee3c7e
......@@ -704,18 +704,23 @@ avtHistogramSpecification::Print(ostream &out) const
// Check whether MPI_INTEGER8 defined even if MPI_UNSIGNED_LONG_LONG
// is defined.
//
// Brad Whitlock, Mon Apr 20 12:06:25 PDT 2009
// Check MPI_VERSION and MPI_SUBVERSION before using MPI_Type_get_extent.
//
// ****************************************************************************
bool
avtHistogramSpecification::GetToRootProcessor(int tag)
{
// Find a long-long data type for the counts array
MPI_Datatype datatype = MPI_LONG_LONG;
MPI_Aint lb,e;
// On at least one mpi implementation (mpich2-1.0.5, Linux-x86-64),
// MPI_LONG_LONG blatantly fails. But for some reason INTEGER8 works.
// Luckily we can tell this by checking the datatype size of the type.
// We'll try a few different ones, and if none work, just do it slowly
// using a single-precision int.
#if (MPI_VERSION >= 2) || ((MPI_VERSION == 1) && (MPI_SUBVERSION > 2))
MPI_Aint lb,e;
#if defined(MPI_UNSIGNED_LONG_LONG)
MPI_Type_get_extent(datatype, &lb, &e);
if (e != sizeof(VISIT_LONG_LONG))
......@@ -731,6 +736,15 @@ avtHistogramSpecification::GetToRootProcessor(int tag)
MPI_Type_get_extent(datatype, &lb, &e);
}
#endif
#else
MPI_Aint e;
MPI_Type_extent(datatype, &e);
if (e != sizeof(VISIT_LONG_LONG))
{
datatype = MPI_UNSIGNED_LONG_LONG;
MPI_Type_extent(datatype, &e);
}
#endif
// Do the matching send/receives
int rank = PAR_Rank();
......
......@@ -701,7 +701,10 @@ SumIntArrayAcrossAllProcessors(int *inArray, int *outArray, int nArray)
// Gunther H. Weber, Mon Apr 6 20:50:50 PDT 2009
// Check whether MPI_INTEGER8 defined even if MPI_UNSIGNED_LONG_LONG
// is defined.
//
//
// Brad Whitlock, Mon Apr 20 12:06:25 PDT 2009
// Check MPI_VERSION and MPI_SUBVERSION before using MPI_Type_get_extent.
//
// ****************************************************************************
void
......@@ -710,12 +713,13 @@ SumLongLongArrayAcrossAllProcessors(VISIT_LONG_LONG *inArray,
{
#ifdef PARALLEL
MPI_Datatype datatype = MPI_LONG_LONG;
MPI_Aint lb,e;
// On at least one mpi implementation (mpich2-1.0.5, Linux-x86-64),
// MPI_LONG_LONG blatantly fails. But for some reason INTEGER8 works.
// Luckily we can tell this by checking the datatype size of the type.
// We'll try a few different ones, and if none work, just do it slowly
// using a single-precision int.
#if (MPI_VERSION >= 2) || ((MPI_VERSION == 1) && (MPI_SUBVERSION > 2))
MPI_Aint lb,e;
#if defined(MPI_UNSIGNED_LONG_LONG)
MPI_Type_get_extent(datatype, &lb, &e);
if (e != sizeof(VISIT_LONG_LONG))
......@@ -731,6 +735,16 @@ SumLongLongArrayAcrossAllProcessors(VISIT_LONG_LONG *inArray,
MPI_Type_get_extent(datatype, &lb, &e);
}
#endif
#else
MPI_Aint e;
MPI_Type_extent(datatype, &e);
if (e != sizeof(VISIT_LONG_LONG))
{
datatype = MPI_UNSIGNED_LONG_LONG;
MPI_Type_extent(datatype, &e);
}
#endif
if (e == sizeof(VISIT_LONG_LONG))
{
MPI_Allreduce(inArray, outArray, nArray, datatype, MPI_SUM,
......@@ -747,6 +761,8 @@ SumLongLongArrayAcrossAllProcessors(VISIT_LONG_LONG *inArray,
VISIT_MPI_COMM);
for (int i=0; i<nArray; i++)
outArray[i] = tmpOutArray[i];
delete [] tmpInArray;
delete [] tmpOutArray;
}
#else
for (int i = 0 ; i < nArray ; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment