Skip to content

Commit

Permalink
Merge 'trilinos/Trilinos:develop' (96f63b1) into 'tcad-charon/Trilino…
Browse files Browse the repository at this point in the history
…s:develop' (435794e).

* trilinos-develop:
  ATDM: Set Amesos2_ENABLE_Epetra=OFF unconditionally (ATDV-202)
  Small tweak to mesh-clone unit-test, only test for gcc version > 4
  Allow enable of Intrepid and therefore Percept in ATDM Trilinos builds (trilinos#6017)
  Fix minor testing issues.
  Fix gcc 4.8.4 compile error in stk BulkData
  Bring stk snapshot to trilinos as of 10/14/2019
  • Loading branch information
Jenkins Pipeline committed Oct 17, 2019
2 parents 435794e + 96f63b1 commit ccc2bf3
Show file tree
Hide file tree
Showing 56 changed files with 1,390 additions and 825 deletions.
2 changes: 1 addition & 1 deletion cmake/std/atdm/ATDMDevEnvSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ ATDM_SET_CACHE(Tpetra_INST_CUDA "${ATDM_USE_CUDA}" CACHE BOOL)
ATDM_SET_CACHE(Tpetra_INST_SERIAL "${ATDM_INST_SERIAL}" CACHE BOOL)
ATDM_SET_CACHE(Tpetra_INST_INT_INT OFF CACHE BOOL)
ATDM_SET_CACHE(Xpetra_ENABLE_Epetra OFF CACHE BOOL)
ATDM_SET_CACHE(Amesos2_ENABLE_Epetra OFF CACHE BOOL)
ATDM_SET_CACHE(MueLu_ENABLE_Kokkos_Refactor_Use_By_Default ON CACHE BOOL)
ATDM_SET_CACHE(MueLu_ENABLE_Epetra OFF CACHE BOOL)
ATDM_SET_CACHE(Piro_ENABLE_MueLu OFF CACHE BOOL)
Expand All @@ -292,7 +293,6 @@ ATDM_SET_CACHE(DART_TESTING_TIMEOUT 600 CACHE STRING)
IF (ATDM_ENABLE_SPARC_SETTINGS)
ATDM_SET_CACHE(Zoltan_ENABLE_ULLONG_IDS ON CACHE BOOL)
ATDM_SET_CACHE(Anasazi_ENABLE_RBGen ON CACHE BOOL)
ATDM_SET_CACHE(Amesos2_ENABLE_Epetra OFF CACHE BOOL)
ENDIF()

#
Expand Down
2 changes: 1 addition & 1 deletion cmake/std/atdm/ATDMDisables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ SET(ATDM_SE_PACKAGE_DISABLES
Trios
FEI
TriKota
Intrepid
STKClassic
STKSearchUtil
STKUnit_tests
Expand Down Expand Up @@ -77,6 +76,7 @@ SET(ATDM_SE_PACKAGE_TEST_DISABLES
Pamgen
Ifpack
ML
Intrepid
)

#
Expand Down
30 changes: 22 additions & 8 deletions packages/stk/stk_balance/stk_balance/balance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void initial_decomp_and_balance(stk::mesh::BulkData &bulk,
run_static_stk_balance_with_settings(stkInput, bulk, outputFilename, bulk.parallel(), graphOptions);
}

void run_stk_balance_with_settings(const std::string& outputFilename, const std::string& exodusFilename, MPI_Comm comm, stk::balance::BalanceSettings& graphOptions)
void run_stk_balance_with_settings(const std::string& outputFilename, const std::string& exodusFilename, MPI_Comm comm, stk::balance::BalanceSettings& balanceSettings)
{
const std::string trimmedInputName = (exodusFilename.substr(0,2) == "./") ? exodusFilename.substr(2) : exodusFilename;
const std::string trimmedOutputName = (outputFilename.substr(0,2) == "./") ? outputFilename.substr(2) : outputFilename;
Expand All @@ -404,26 +404,40 @@ void run_stk_balance_with_settings(const std::string& outputFilename, const std:
const std::string initialDecompMethod = "RIB";
stk::mesh::MetaData meta;
stk::mesh::BulkData bulk(meta, comm);
initial_decomp_and_balance(bulk, graphOptions, exodusFilename, outputFilename, initialDecompMethod);
meta.set_coordinate_field_name(balanceSettings.getCoordinateFieldName());

initial_decomp_and_balance(bulk, balanceSettings, exodusFilename, outputFilename, initialDecompMethod);
}

class StkBalanceSettings : public GraphCreationSettings
{
public:
StkBalanceSettings()
: GraphCreationSettings()
{}

std::string getCoordinateFieldName() const override {
return "balance_coordinates";
}
};

void run_stk_rebalance(const std::string& outputDirectory, const std::string& inputFile, stk::balance::AppTypeDefaults appType, MPI_Comm comm)
{
stk::balance::GraphCreationSettings graphOptions;
StkBalanceSettings balanceSettings;

if (appType == stk::balance::SD_DEFAULTS)
{
graphOptions.setShouldFixSpiders(true);
balanceSettings.setShouldFixSpiders(true);
}
else if (appType == stk::balance::SM_DEFAULTS)
{
graphOptions.setEdgeWeightForSearch(3.0);
graphOptions.setVertexWeightMultiplierForVertexInSearch(10.0);
graphOptions.setToleranceFunctionForFaceSearch(std::make_shared<stk::balance::SecondShortestEdgeFaceSearchTolerance>());
balanceSettings.setEdgeWeightForSearch(3.0);
balanceSettings.setVertexWeightMultiplierForVertexInSearch(10.0);
balanceSettings.setToleranceFunctionForFaceSearch(std::make_shared<stk::balance::SecondShortestEdgeFaceSearchTolerance>());
}

std::string outputFilename = construct_output_file_name(outputDirectory, inputFile);
run_stk_balance_with_settings(outputFilename, inputFile, comm, graphOptions);
run_stk_balance_with_settings(outputFilename, inputFile, comm, balanceSettings);
}

}
Expand Down
2 changes: 1 addition & 1 deletion packages/stk/stk_io/stk_io/ProcessSetsOrBlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void process_nodeblocks(Ioss::Region &region, stk::mesh::MetaData &meta)
assert(node_blocks.size() == 1);

stk::mesh::Field<double, stk::mesh::Cartesian>& coord_field =
meta.declare_field<stk::mesh::Field<double, stk::mesh::Cartesian> >(stk::topology::NODE_RANK, stk::io::CoordinateFieldName);
meta.declare_field<stk::mesh::Field<double, stk::mesh::Cartesian> >(stk::topology::NODE_RANK, meta.coordinate_field_name());
stk::io::set_field_role(coord_field, Ioss::Field::MESH);

meta.set_coordinate_field(&coord_field);
Expand Down
2 changes: 0 additions & 2 deletions packages/stk/stk_io/stk_io/StkMeshIoBroker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ namespace Ioss { class DatabaseIO; }
namespace stk {
namespace io {

static std::string CoordinateFieldName("coordinates");

struct QaRecord
{
std::string name;
Expand Down
11 changes: 5 additions & 6 deletions packages/stk/stk_mesh/stk_mesh/base/Bucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,7 @@ Bucket::Bucket( BulkData & arg_mesh ,
, m_capacity(arg_capacity)
, m_size(0)
, m_bucket_id(bucket_id)
// TODO: Move owner ranks to BulkData
, m_entities(arg_capacity)
, m_owner_ranks(arg_capacity)
, m_partition(nullptr)
, m_node_kind(INVALID_CONNECTIVITY_TYPE)
, m_edge_kind(INVALID_CONNECTIVITY_TYPE)
Expand Down Expand Up @@ -314,7 +312,6 @@ size_t Bucket::memory_size_in_bytes() const
{
size_t bytes = sizeof(Bucket);
bytes += impl::capacity_in_bytes(m_entities);
bytes += impl::capacity_in_bytes(m_owner_ranks);
bytes += m_fixed_node_connectivity.heap_memory_in_bytes();
bytes += m_fixed_edge_connectivity.heap_memory_in_bytes();
bytes += m_fixed_face_connectivity.heap_memory_in_bytes();
Expand Down Expand Up @@ -640,20 +637,22 @@ size_t Bucket::get_others_index_count(size_type bucket_ordinal, EntityRank rank)
void Bucket::initialize_slot(size_type ordinal, Entity entity)
{
m_entities[ordinal] = entity;
m_owner_ranks[ordinal] = 0;
if (mesh().is_valid(entity)) {
mesh().set_state(entity, Created);
}
}

int Bucket::parallel_owner_rank(size_type ordinal) const
{
return m_mesh.parallel_owner_rank(m_entities[ordinal]);
}

void Bucket::reset_entity_location(Entity entity, size_type to_ordinal, const FieldVector* fields)
{
Bucket & from_bucket = mesh().bucket(entity);
const Bucket::size_type from_ordinal = mesh().bucket_ordinal(entity);
const int owner_rank = mesh().parallel_owner_rank(entity);

m_entities[to_ordinal] = entity;
m_owner_ranks[to_ordinal] = owner_rank;

mesh().set_mesh_index(entity, this, to_ordinal);

Expand Down
6 changes: 1 addition & 5 deletions packages/stk/stk_mesh/stk_mesh/base/Bucket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ class Bucket

// Entity data
std::vector<Entity> m_entities; // Array of entity handles; will be removed soon
std::vector<int> m_owner_ranks;

impl::Partition *m_partition;

Expand Down Expand Up @@ -267,10 +266,7 @@ class Bucket
/// Entity member functions are moved here:
///

int parallel_owner_rank(size_type ordinal) const
{
return m_owner_ranks[ordinal];
}
int parallel_owner_rank(size_type ordinal) const;

void check_size_invariant() const;

Expand Down
Loading

0 comments on commit ccc2bf3

Please sign in to comment.