Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2319: MueLu research build #2326

Merged
merged 6 commits into from
Mar 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/std/atdm/shiller/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "Using hansen/shiller compiler stack $ATDM_CONFIG_COMPILER to build $ATDM_C

module load ninja/1.7.2

export ATDM_CONFIG_KOKKOS_ARCH=BDW
export ATDM_CONFIG_KOKKOS_ARCH=HSW
if [ "$ATDM_CONFIG_COMPILER" == "GNU" ]; then
module load devpack/openmpi/2.1.1/gcc/4.9.3/cuda/8.0.61
export OMPI_CXX=`which g++`
Expand Down
1 change: 1 addition & 0 deletions cmake/std/atdm/shiller/tweaks/CUDA-DEBUG-CUDA.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CUDA_COMMON_TWEAKS.cmake")
1 change: 1 addition & 0 deletions cmake/std/atdm/shiller/tweaks/CUDA-RELEASE-CUDA.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CUDA_COMMON_TWEAKS.cmake")
9 changes: 9 additions & 0 deletions cmake/std/atdm/shiller/tweaks/CUDA_COMMON_TWEAKS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ATDM_SET_ENABLE(Panzer_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerCore_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerDofMgr_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerDiscFE_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerAdaptersSTK_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerAdaptersIOSS_ENABLE_EXAMPLES OFF)
ATDM_SET_ENABLE(PanzerMiniEM_ENABLE_EXAMPLES OFF)
# ToDo: Change TriBITS so that, by default, Panzer_ENABLE_EXAMPLES=OFF will
# disable examples in the Panzer subpackages!q
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../../test/unit_tests)
COMM serial mpi
)

TRIBITS_ADD_EXECUTABLE(
ImportTest
SOURCES Import.cpp
COMM serial mpi
)

# TRIBITS_COPY_FILES_TO_BINARY_DIR(tawiesn_cp
# SOURCE_FILES driver.xml
# )
Expand Down
187 changes: 0 additions & 187 deletions packages/muelu/research/luc/region_algorithms/Import.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion packages/teuchos/core/src/Teuchos_BigUInt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ BigUInt<n>& BigUInt<n>::operator>>=(std::uint32_t b) {
auto ndigits = b / 32;
auto nbits = b - (ndigits * 32);
for (int i = 0; i < n; ++i) {
std::uint32_t xi;
std::uint32_t xi = 0;
if (i + ndigits < n) xi = x[i + ndigits] >> nbits;
if (nbits && i + ndigits + 1 < n) xi |= x[i + ndigits + 1] << (32 - nbits);
x[i] = xi;
Expand Down
45 changes: 35 additions & 10 deletions packages/zoltan2/example/block/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
#include <Zoltan2_PartitioningProblem.hpp>
#include <Zoltan2_PartitioningSolution.hpp>

using namespace std;

/*! \example block.cpp
An example of the use of the Block algorithm to partition data.
\todo error handling
Expand Down Expand Up @@ -80,18 +78,20 @@ int main(int argc, char *argv[])
///////////////////////////////////////////////////////////////////////
// Generate some input data.

size_t localCount = 40*(rank+1);
globalId_t *globalIds = new globalId_t [localCount];
int localCount = 40*(rank+1);
int totalCount = 20*nprocs*(nprocs+1);
int targetCount = totalCount / nprocs;
globalId_t *globalIds = new globalId_t[localCount];

if (rank==0)
for (int i=0, num=40; i <= nprocs ; i++, num+=40)
cout << "Rank " << i << " has " << num << " ids." << endl;
for (int i=0, num=40; i < nprocs ; i++, num+=40)
std::cout << "Rank " << i << " generates " << num << " ids." << std::endl;

globalId_t offset = 0;
for (int i=1; i <= rank; i++)
offset += 40*i;

for (size_t i=0; i < localCount; i++)
for (int i=0; i < localCount; i++)
globalIds[i] = offset++;

///////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -132,10 +132,35 @@ int main(int argc, char *argv[])
problem->solve();

///////////////////////////////////////////////////////////////////////
// Check the solution.
// Check and print the solution.
// Count number of IDs assigned to each part; compare to targetCount

const globalId_t *ids = NULL;
ia.getIDsView(ids);
std::vector<int> partCounts(nprocs, 0), globalPartCounts(nprocs, 0);

for (size_t i = 0; i < ia.getLocalNumIDs(); i++) {
int pp = problem->getSolution().getPartListView()[i];
std::cout << rank << " LID " << i << " GID " << ids[i]
<< " PART " << pp << std::endl;
partCounts[pp]++;
}

#ifdef HAVE_ZOLTAN2_MPI
MPI_Allreduce(&(partCounts[0]), &(globalPartCounts[0]), nprocs,
MPI_INT, MPI_SUM, MPI_COMM_WORLD);
#endif

if (rank == 0)
cout << "PASS" << endl;
if (rank == 0) {
int ierr = 0;
for (int i = 0; i < nprocs; i++)
if (globalPartCounts[i] != targetCount)
std::cout << "FAIL: part " << i << " has " << partCounts[i]
<< " != " << targetCount << "; " << ++ierr << " errors"
<< std::endl;
if (ierr == 0)
std::cout << "PASS" << std::endl;
}

delete [] globalIds;
delete problem;
Expand Down