[MOAB-dev] r5977 - in MOAB/trunk/src: . parallel
iulian at mcs.anl.gov
iulian at mcs.anl.gov
Wed Feb 6 11:44:37 CST 2013
Author: iulian
Date: 2013-02-06 11:44:36 -0600 (Wed, 06 Feb 2013)
New Revision: 5977
Modified:
MOAB/trunk/src/SparseTag.hpp
MOAB/trunk/src/parallel/ParallelComm.cpp
Log:
pgi compiler didn't find the boost unordered map (don't know why, but fall back
to regular map in that case)
also, pgi compiler didn't like some construct in std::copy_backward;
spell it out more clearly
Modified: MOAB/trunk/src/SparseTag.hpp
===================================================================
--- MOAB/trunk/src/SparseTag.hpp 2013-02-06 04:27:03 UTC (rev 5976)
+++ MOAB/trunk/src/SparseTag.hpp 2013-02-06 17:44:36 UTC (rev 5977)
@@ -452,7 +452,11 @@
inline void *SparseTag::allocate_data(EntityHandle h, MapType::const_iterator iter, bool copy_default)
{
void* new_data = mAllocator.allocate(get_size());
+#ifdef HAVE_UNORDERED_MAP
mData.insert(iter, std::pair<const EntityHandle,void*>(h, new_data));
+#else
+ mData[h] = new_data;
+#endif;
if (copy_default)
memcpy(new_data, get_default_value(), get_size());
return new_data;
Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp 2013-02-06 04:27:03 UTC (rev 5976)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp 2013-02-06 17:44:36 UTC (rev 5977)
@@ -8567,7 +8567,9 @@
std::vector<int> recvcnts(proc_config().proc_size(), 0);
std::copy(displs.begin(), displs.end(), recvcnts.begin());
std::partial_sum(displs.begin(), displs.end(), displs.begin());
- std::copy_backward(displs.begin(), --displs.end(), displs.end());
+ std::vector<int>::iterator lastM1 = displs.end()-1;
+ std::copy_backward(displs.begin(), lastM1, displs.end());
+ //std::copy_backward(displs.begin(), --displs.end(), displs.end());
displs[0] = 0;
if (rank()!=0)
More information about the moab-dev
mailing list