Skip to content

Commit

Permalink
Merge Pull Request #7111 from trilinos/Trilinos/master_merge_20200402…
Browse files Browse the repository at this point in the history
…_000620

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20200402_000620 branch to master
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Apr 2, 2020
2 parents 96edc44 + 779032e commit da562d1
Show file tree
Hide file tree
Showing 102 changed files with 1,328 additions and 4,025 deletions.
10 changes: 5 additions & 5 deletions packages/kokkos-kernels/src/sparse/KokkosSparse_CrsMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class CrsMatrix {
typedef typename Device::execution_space execution_space;
//! Type of the matrix's memory space.
typedef typename Device::memory_space memory_space;
//! Type of the matrix's device type.
//! Canonical device type
typedef Kokkos::Device<execution_space, memory_space> device_type;

//! Type of each value in the matrix.
Expand All @@ -407,14 +407,14 @@ class CrsMatrix {
typedef CrsMatrix<ScalarType, OrdinalType, host_mirror_space, MemoryTraits> HostMirror;
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
//! Type of the graph structure of the sparse matrix.
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, execution_space, size_type, memory_traits> StaticCrsGraphType;
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, device_type, size_type, memory_traits> StaticCrsGraphType;
//! Type of the graph structure of the sparse matrix - consistent with Kokkos.
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, execution_space, size_type, memory_traits> staticcrsgraph_type;
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, device_type, size_type, memory_traits> staticcrsgraph_type;
#else
//! Type of the graph structure of the sparse matrix.
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, execution_space, memory_traits, size_type> StaticCrsGraphType;
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, device_type, memory_traits, size_type> StaticCrsGraphType;
//! Type of the graph structure of the sparse matrix - consistent with Kokkos.
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, execution_space, memory_traits, size_type> staticcrsgraph_type;
typedef Kokkos::StaticCrsGraph<ordinal_type, Kokkos::LayoutLeft, device_type, memory_traits, size_type> staticcrsgraph_type;
#endif
//! Type of column indices in the sparse matrix.
typedef typename staticcrsgraph_type::entries_type index_type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ namespace MueLu {
using global_ordinal_type = GlobalOrdinal;
using execution_space = typename DeviceType::execution_space;
using memory_space = typename DeviceType::memory_space;
using device_type = Kokkos::Device<execution_space, memory_space>;
using range_type = Kokkos::RangePolicy<local_ordinal_type, execution_space>;
using node_type = Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType>;
using size_type = size_t;

using map_type = Xpetra::Map<LocalOrdinal, GlobalOrdinal, node_type>;
using local_graph_type = Kokkos::StaticCrsGraph<LocalOrdinal,
Kokkos::LayoutLeft,
execution_space>;
device_type>;
using boundary_nodes_type = Kokkos::View<const bool*, memory_space>;
using row_type = Kokkos::View<const LocalOrdinal*, memory_space>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
<ParameterList name="Preconditioner Types">
<ParameterList name="MueLuRefMaxwell">
<Parameter name="parameterlist: syntax" type="string" value="muelu"/>
<Parameter name="use kokkos refactor" type="bool" value="false"/>
<Parameter name="verbosity" type="string" value="extreme"/>
<Parameter name="refmaxwell: use as preconditioner" type="bool" value="true"/>
<Parameter name="refmaxwell: mode" type="string" value="additive"/>
Expand Down Expand Up @@ -192,6 +193,7 @@
<!-- </ParameterList> -->

<ParameterList name="refmaxwell: 11list">
<Parameter name="use kokkos refactor" type="bool" value="false"/>
<Parameter name="verbosity" type="string" value="extreme"/>
<Parameter name="coarse: max size" type="int" value="2500"/>
<Parameter name="number of equations" type="int" value="3"/>
Expand Down Expand Up @@ -245,6 +247,7 @@
</ParameterList>

<ParameterList name="refmaxwell: 22list">
<Parameter name="use kokkos refactor" type="bool" value="false"/>
<Parameter name="verbosity" type="string" value="extreme"/>
<Parameter name="coarse: max size" type="int" value="2500"/>
<Parameter name="multigrid algorithm" type="string" value="unsmoothed"/>
Expand Down
71 changes: 0 additions & 71 deletions packages/percept/src/adapt/NodeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3185,75 +3185,4 @@
}
}
}

bool NodeRegistry::verifyAllKeysInKokkosNR(NodeRegistry_KOKKOS * nrk, SetOfEntities& nodesMappedTo, unsigned& noKeysNotInCommon)
{ //checks if all the key value pairs of the NodeRegistry being called on match key value pairs in the NodeRegistry_KOKKOS being passed as an argument
//madbrew: not sure if this is really a fair comparison since the node id's in NodeIdsOnSubDimEntityType can differ due to the fact that map loops differ between the registry's when adding id's
//this causes the registry's to have the same number of id's and even the same sets of id's but a different mapping between parent (i.e. edge/face) and children node(s)
nodesMappedTo.clear();
noKeysNotInCommon = 0;
if(!nrk)
{
std::cout << "NodeRegistry::compare_to_kokkos_NR : Invalid NodeRegistry_KOKKOS pointer, aborting NR diff\n";
return false;
}

bool kUOmap_contains_bUOmap = true;

SubDimCellToDataMap * map = &m_cell_2_data_map;
for (SubDimCellToDataMap::iterator iter = map->begin(); iter != map->end(); ++iter)
{
const SubDimCell_SDCEntityType& subDimEntity_BOOST = (*iter).first;
SubDimCellData& data_BOOST = (*iter).second;

SubDimCellData * data_KOKKOS = nrk->getFromMapPtr(subDimEntity_BOOST);

if(!data_KOKKOS){
kUOmap_contains_bUOmap = false;
if(kUOmap_contains_bUOmap)
std::cout << "NodeRegistry::compare_to_kokkos_NR : key with m_HashCode = " << subDimEntity_BOOST.getHash() << " NOT FOUND kokkos map\n";
noKeysNotInCommon++;
}
else
{
if ( !( std::get<0>(*data_KOKKOS) == std::get<0>(data_BOOST) ))
{
// kUOmap_contains_bUOmap = false;
std::cout << "NodeRegistry::compare_to_kokkos_NR : NodeIdsOnSubDimEntityType on tuple's do not match between NodeRegistry and KokkosNodeRegistry\n";
std::cout << " kOUmap NodeIdsOnSubDimEntityType = "<< std::get<0>(*data_KOKKOS) << " bOUmap NodeIdsOnSubDimEntityType = " << std::get<0>(data_BOOST) << "\n";
}
if(!( std::get<1>(*data_KOKKOS) == std::get<1>(data_BOOST) ))
{
// kUOmap_contains_bUOmap = false;
std::cout << "NodeRegistry::compare_to_kokkos_NR : EntityKey on tuple's do not match between NodeRegistry and KokkosNodeRegistry\n";
std::cout << " kOUmap EntityKey = "<< std::get<1>(*data_KOKKOS) << " bOUmap EntityKey = " << std::get<1>(data_BOOST) << "\n";
}
if(!( std::get<2>(*data_KOKKOS) == std::get<2>(data_BOOST) ) )
{
// kUOmap_contains_bUOmap = false;
std::cout << "NodeRegistry::compare_to_kokkos_NR : unsigned char on tuple's do not match between NodeRegistry and KokkosNodeRegistry\n";
std::cout << " kOUmap unsigned char = "<< std::get<2>(*data_KOKKOS) << " bOUmap unsigned char = " << std::get<2>(data_BOOST) << "\n";
}
if(!( std::get<3>(*data_KOKKOS) == std::get<3>(data_BOOST) ) )
{
// kUOmap_contains_bUOmap = false;
std::cout << "NodeRegistry::compare_to_kokkos_NR : unsigned char on tuple's do not match between NodeRegistry and KokkosNodeRegistry\n";
std::cout << " kOUmap unsigned char = "<< std::get<3>(*data_KOKKOS) << " bOUmap unsigned char = " << std::get<3>(data_BOOST) << "\n";
}
if(!( std::get<4>(*data_KOKKOS) == std::get<4>(data_BOOST) ) )
{
// kUOmap_contains_bUOmap = false;
std::cout << "NodeRegistry::compare_to_kokkos_NR : Double2 on tuple's do not match between NodeRegistry and KokkosNodeRegistry\n";
std::cout << " kOUmap Double2 = "<< std::get<4>(*data_KOKKOS) << " bOUmap Double2 = " << std::get<4>(data_BOOST) << "\n";
}
}
if(!kUOmap_contains_bUOmap)
std::cout << "NodeRegistry::compare_to_kokkos_NR : key with m_HashCode = " << subDimEntity_BOOST.getHash() << " doesn't match anything in kokkos map\n\n";
for(unsigned iEnt=0;iEnt<std::get<0>(data_BOOST).m_entity_id_vector.size();iEnt++){
unsigned ent_val = std::get<0>(data_BOOST).m_entity_id_vector[iEnt];
nodesMappedTo.insert(stk::mesh::Entity(ent_val));
}
}
return noKeysNotInCommon==0;
}
}//percept
5 changes: 0 additions & 5 deletions packages/percept/src/adapt/NodeRegistry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@
#define DEBUG_NR_DEEP 0

#include <adapt/NodeRegistryType.hpp>
#include <adapt/NodeRegistry_KOKKOS.hpp>

// use old PerceptMesh/BulkData create entities if set to 1 - if 0, use PerceptMesh ID server which is much faster (doesn't use DistributedIndex)
#define USE_CREATE_ENTITIES 0

namespace percept {

class NodeRegistry_KOKKOS;

using std::vector;
using std::map;
using std::set;
Expand Down Expand Up @@ -350,8 +347,6 @@
void mod_begin();
void mod_end(const std::string& msg="");

bool verifyAllKeysInKokkosNR(NodeRegistry_KOKKOS * nrk, SetOfEntities& nodesMappedTo, unsigned& noKeysNotInCommon);

private:
percept::PerceptMesh& m_eMesh;
Refiner *m_refiner;
Expand Down
Loading

0 comments on commit da562d1

Please sign in to comment.