Skip to content

Commit

Permalink
Merge pull request #2 from trilinos/develop
Browse files Browse the repository at this point in the history
Trilinos Merge 6/5/19
  • Loading branch information
krcb authored Jun 5, 2019
2 parents 10dde3b + 20d8b88 commit ee021a4
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 17 deletions.
14 changes: 14 additions & 0 deletions cmake/std/atdm/sems-rhel7/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ elif [[ "$ATDM_CONFIG_COMPILER" == "INTEL-17.0.1" ]] ; then
if [[ "${ATDM_CONFIG_LM_LICENSE_FILE_OVERRIDE}" != "" ]] ; then
export LM_LICENSE_FILE=${ATDM_CONFIG_LM_LICENSE_FILE_OVERRIDE}
fi
elif [[ "$ATDM_CONFIG_COMPILER" == "INTEL-18.0.5" ]] ; then
module load sems-gcc/7.2.0
module load sems-intel/18.0.5
module load atdm-env
module load atdm-mkl/18.0.5
export OMPI_CXX=`which icpc`
export OMPI_CC=`which icc`
export OMPI_FC=`which ifort`
export ATDM_CONFIG_LAPACK_LIBS="-mkl"
export ATDM_CONFIG_BLAS_LIBS="-mkl"
export [email protected]
if [[ "${ATDM_CONFIG_LM_LICENSE_FILE_OVERRIDE}" != "" ]] ; then
export LM_LICENSE_FILE=${ATDM_CONFIG_LM_LICENSE_FILE_OVERRIDE}
fi
elif [[ "$ATDM_CONFIG_COMPILER" == "CUDA-9.2" ]] ; then
module load sems-gcc/7.2.0
module load sems-cuda/9.2
Expand Down
14 changes: 8 additions & 6 deletions packages/stk/stk_balance/stk_balance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ FILE(GLOB SOURCES *.cpp)
FILE(GLOB HEADERS_INTERNAL ${CMAKE_CURRENT_SOURCE_DIR}/internal/*.hpp)
FILE(GLOB SOURCES_INTERNAL ${CMAKE_CURRENT_SOURCE_DIR}/internal/*.cpp)

IF(NOT TPL_ENABLE_BoostLib)
LIST(REMOVE_ITEM HEADERS_INTERNAL "${CMAKE_CURRENT_SOURCE_DIR}/internal/balanceCommandLine.hpp")
LIST(REMOVE_ITEM SOURCES_INTERNAL "${CMAKE_CURRENT_SOURCE_DIR}/internal/balanceCommandLine.cpp")
ENDIF()

FILE(GLOB HEADERS_SEARCH_TOLERANCE ${CMAKE_CURRENT_SOURCE_DIR}/search_tolerance/*.hpp)

FILE(GLOB HEADERS_SEARCH_TOLERANCE_ALGS ${CMAKE_CURRENT_SOURCE_DIR}/search_tolerance_algs/*.hpp)
Expand All @@ -88,12 +93,7 @@ TRIBITS_ADD_LIBRARY(
DEPLIBS
)

# TRIBITS_ADD_LIBRARY(
# stk_balance_search_tolerance_algs
# NOINSTALLHEADERS ${HEADERS_SEARCH_TOLERANCE_ALGS}
# SOURCES ${SOURCES_SEARCH_TOLERANCE_ALGS}
# DEPLIBS
# )
IF(TPL_ENABLE_BoostLib)

TRIBITS_ADD_EXECUTABLE(
stk_balance
Expand All @@ -109,6 +109,8 @@ TRIBITS_ADD_EXECUTABLE(
NOEXEPREFIX INSTALLABLE
)

ENDIF()

INSTALL(FILES ${HEADERS} DESTINATION
${CMAKE_INSTALL_PREFIX}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}/stk_balance)
INSTALL(FILES ${HEADERS_INTERNAL} DESTINATION
Expand Down
7 changes: 6 additions & 1 deletion packages/stk/stk_io/stk_io/InputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

// ####################### Start Clang Header Tool Managed Headers ########################
// clang-format off
#include <stk_util/stk_config.h>
#include <stk_io/InputFile.hpp>
#include <math.h> // for fmod
#include <stddef.h> // for size_t
Expand All @@ -46,7 +47,9 @@
#include <stk_mesh/base/FieldBase.hpp> // for FieldBase, etc
#include <stk_mesh/base/FindRestriction.hpp> // for find_restriction
#include <stk_mesh/base/MetaData.hpp> // for MetaData
#if defined(STK_HAVE_BOOSTLIB)
#include <stk_util/environment/FileUtils.hpp>
#endif
#include <stk_util/util/ReportHandler.hpp> // for ThrowErrorMsgIf
#include <utility> // for pair
#include "Ioss_DBUsage.h" // for DatabaseUsage, etc
Expand Down Expand Up @@ -132,8 +135,10 @@ namespace stk {
Ioss::DatabaseUsage db_usage = Ioss::READ_MODEL;
if (m_db_purpose == stk::io::READ_RESTART)
db_usage = Ioss::READ_RESTART;


#if defined(STK_HAVE_BOOSTLIB)
stk::util::filename_substitution(mesh_filename);
#endif
m_database = Teuchos::rcp(Ioss::IOFactory::create(mesh_type, mesh_filename,
db_usage, communicator,
properties));
Expand Down
7 changes: 7 additions & 0 deletions packages/stk/stk_io/stk_io/StkMeshIoBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

// ####################### Start Clang Header Tool Managed Headers ########################
// clang-format off
#include <stk_util/stk_config.h>
#include <stk_io/StkMeshIoBroker.hpp>
#include <stk_util/environment/Env.hpp>
#include <Ionit_Initializer.h> // for Initializer
Expand All @@ -55,7 +56,9 @@
#include <stk_mesh/base/Field.hpp> // for Field
#include <stk_mesh/base/GetEntities.hpp>
#include <stk_mesh/base/MetaData.hpp> // for MetaData, etc
#if defined(STK_HAVE_BOOSTLIB)
#include <stk_util/environment/FileUtils.hpp>
#endif
#include <stk_util/util/ReportHandler.hpp> // for ThrowErrorMsgIf, etc
#include <utility> // for pair, make_pair
#include "Ioss_CodeTypes.h" // for NameList
Expand Down Expand Up @@ -505,7 +508,9 @@ size_t StkMeshIoBroker::create_output_mesh(const std::string &filename, Database
}

std::string out_filename = filename;
#if defined(STK_HAVE_BOOSTLIB)
stk::util::filename_substitution(out_filename);
#endif
Ioss::Region *input_region = nullptr;
if (is_index_valid(m_inputFiles, m_activeMeshIndex)) {
input_region = get_input_io_region().get();
Expand Down Expand Up @@ -1157,7 +1162,9 @@ size_t StkMeshIoBroker::add_heartbeat_output(const std::string &filename, Heartb
const Ioss::PropertyManager &properties, bool openFileImmediately)
{
std::string out_filename = filename;
#if defined(STK_HAVE_BOOSTLIB)
stk::util::filename_substitution(out_filename);
#endif
auto heartbeat = Teuchos::rcp(new impl::Heartbeat(out_filename, hb_type,
properties, m_communicator, openFileImmediately));
m_heartbeat.push_back(heartbeat);
Expand Down
2 changes: 0 additions & 2 deletions packages/stk/stk_search/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

TRIBITS_SUBPACKAGE(Search)


ADD_SUBDIRECTORY(stk_search)

IF(Trilinos_ENABLE_STKNGP_TEST)
TRIBITS_ADD_TEST_DIRECTORIES(unit_tests)
TRIBITS_ADD_TEST_DIRECTORIES(integrationtest)
ENDIF()


TRIBITS_SUBPACKAGE_POSTPROCESS()
2 changes: 1 addition & 1 deletion packages/stk/stk_search/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_REQUIRED_DEP_PACKAGES STKUnit_test_utils Gtest)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS MPI)
SET(LIB_OPTIONAL_DEP_TPLS Boost)
SET(LIB_OPTIONAL_DEP_TPLS Boost BoostLib)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS Boost)
28 changes: 26 additions & 2 deletions packages/stk/stk_search/integrationtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,36 @@ FILE(GLOB SOURCES *.cpp)
LIST(REMOVE_ITEM SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/UnitTestPerformance.cpp)
LIST(REMOVE_ITEM SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/UnitTestNaluPerformance.cpp)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
TRIBITS_ADD_EXECUTABLE(
search_integration_tests
SOURCES ${SOURCES}
TESTONLYLIBS stk_unit_main
COMM serial mpi
)

IF(TPL_ENABLE_BoostLib)

TRIBITS_ADD_TEST(
search_integration_tests
NAME STKSearch_integration_tests
ARGS ""
COMM serial mpi
PASS_REGULAR_EXPRESSION "PASS"
FAIL_REGULAR_EXPRESSION "FAIL"
NUM_MPI_PROCS 1
)
)

else()

TRIBITS_ADD_TEST(
search_integration_tests
NAME STKSearch_integration_tests
ARGS "--gtest_filter=*KDTREE"
COMM serial mpi
PASS_REGULAR_EXPRESSION "PASS"
FAIL_REGULAR_EXPRESSION "FAIL"
NUM_MPI_PROCS 1
)

ENDIF()

12 changes: 12 additions & 0 deletions packages/stk/stk_search/stk_search/CoarseSearch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@
#ifndef stk_search_CoarseSearch_hpp
#define stk_search_CoarseSearch_hpp

#include <stk_util/stk_config.h>
#include <stk_util/util/ReportHandler.hpp>
#include <stk_search/IdentProc.hpp>
#include <stk_search/BoundingBox.hpp>
#if defined(STK_HAVE_BOOSTLIB)
#include <stk_search/CoarseSearchBoostRTree.hpp>
#endif
#include <stk_search/CoarseSearchKdTree.hpp>
#include <stk_search/SearchMethod.hpp>
#include <vector>
Expand Down Expand Up @@ -73,7 +77,11 @@ void coarse_search_nonIdentProc(
switch( method )
{
case BOOST_RTREE:
#if defined(STK_HAVE_BOOSTLIB)
coarse_search_boost_rtree_output_locally<DomainBox, DomainIdent, RangeBox, RangeIdent>(domain,range,comm,intersections);
#else
ThrowRequireMsg(false,"ERROR, the BOOST_RTREE option in stk_search requires that Trilinos was configured with TPL_ENABLE_BoostLib:BOOL=ON");
#endif
break;
default:
std::cerr << "coarse_search(..) interface used does not support std::search::coarse_search_nonIdentProc(..) yet" << method << std::endl;
Expand Down Expand Up @@ -115,7 +123,11 @@ void coarse_search( std::vector<std::pair<DomainBox,DomainIdent> > const& domain
{
case BOOST_RTREE:
#ifndef __NVCC__
#if defined(STK_HAVE_BOOSTLIB)
coarse_search_boost_rtree(domain,range,comm,intersections,communicateRangeBoxInfo);
#else
ThrowRequireMsg(false,"ERROR, the BOOST_RTREE option in stk_search requires that Trilinos was configured with TPL_ENABLE_BoostLib:BOOL=ON");
#endif
break;
#endif
case KDTREE:
Expand Down
17 changes: 14 additions & 3 deletions packages/stk/stk_search/unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,23 @@ FILE(GLOB SOURCES *.cpp)
#removing due to dependence on geometry toolkit which is not available to Trilinos
LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCoarseSearch.cpp")

TRIBITS_ADD_EXECUTABLE_AND_TEST(
IF(NOT TPL_ENABLE_BoostLib)
LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCoarseSearchBoostImpl.cpp")
ENDIF()

TRIBITS_ADD_EXECUTABLE(
search_unit_tests
SOURCES ${SOURCES}
TESTONLYLIBS stk_unit_main
ARGS ""
COMM serial mpi
NUM_MPI_PROCS 1
)

TRIBITS_ADD_TEST(
search_unit_tests
NAME STKSearch_unit_tests
ARGS ""
COMM serial mpi
PASS_REGULAR_EXPRESSION "PASS"
FAIL_REGULAR_EXPRESSION "FAIL"
NUM_MPI_PROCS 1
)
2 changes: 2 additions & 0 deletions packages/stk/stk_search/unit_tests/UnitTestUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@

#include <stk_unit_test_utils/getOption.h>

#include <iomanip>

typedef stk::search::IdentProc<int,int> Ident;
typedef stk::search::Point<double> Point;
typedef stk::search::Sphere<double> Sphere;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#ifndef STK_SEARCH_UTIL_STK_MESH_PERIODIC_BOUNDARY_SEARCH_HPP
#define STK_SEARCH_UTIL_STK_MESH_PERIODIC_BOUNDARY_SEARCH_HPP

#include <stk_util/stk_config.h>
#include <stk_search/CoarseSearch.hpp>
#include <stk_search/BoundingBox.hpp>
#include <stk_search/IdentProc.hpp>
Expand Down Expand Up @@ -160,6 +161,7 @@ class PeriodicBoundarySearch
// Default is identity transform.
}

#if defined(STK_HAVE_BOOST)
TransformHelper(const boost::array<double, 3> & trans_arg)
: m_transform_type(TRANSLATION)
, m_translation(3,0)
Expand All @@ -168,6 +170,7 @@ class PeriodicBoundarySearch
m_translation[1] = trans_arg[1];
m_translation[2] = trans_arg[2];
}
#endif

TransformHelper(double angle, const double axis[3])
: m_transform_type(ROTATIONAL)
Expand Down
14 changes: 14 additions & 0 deletions packages/stk/stk_tools/stk_tools/block_extractor/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "mpi.h"
#include <iosfwd>
#include <vector>
#include <stk_util/stk_config.h>

#if defined(STK_HAVE_BOOSTLIB)

#include <stk_tools/block_extractor/ParseCsv.hpp>
#include <stk_util/command_line/CommandLineParserParallel.hpp>
#include <stk_util/command_line/CommandLineParserUtils.hpp>
Expand Down Expand Up @@ -29,4 +33,14 @@ int main(int argc, const char**argv)
return 0;
}

#else

int main(int argc, const char**argv)
{
std::cerr<<"ERROR, stk_block_extractor requires that Trilinos was configured with -DTPL_ENABLE_BoostLib:BOOL=ON"
<< std::endl;
return -1;
}

#endif

2 changes: 1 addition & 1 deletion packages/stk/stk_transfer/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SET(LIB_REQUIRED_DEP_PACKAGES STKUtil STKSearch)
SET(LIB_OPTIONAL_DEP_PACKAGES)
SET(TEST_REQUIRED_DEP_PACKAGES)
SET(TEST_OPTIONAL_DEP_PACKAGES)
SET(LIB_REQUIRED_DEP_TPLS)
SET(LIB_REQUIRED_DEP_TPLS BoostLib)
SET(LIB_OPTIONAL_DEP_TPLS Boost)
SET(TEST_REQUIRED_DEP_TPLS)
SET(TEST_OPTIONAL_DEP_TPLS)
Expand Down
2 changes: 1 addition & 1 deletion packages/stk/stk_util/stk_util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ADD_SUBDIRECTORY(util)
IF(TPL_ENABLE_MPI)

ADD_SUBDIRECTORY(parallel)
ADD_SUBDIRECTORY(registry)
ADD_SUBDIRECTORY(environment)
ADD_SUBDIRECTORY(registry)
ADD_SUBDIRECTORY(diag)

IF ( ${PACKAGE_NAME}_ENABLE_SEACASIoss )
Expand Down

0 comments on commit ee021a4

Please sign in to comment.