Skip to content

Commit

Permalink
Merge Pull Request #7558 from trilinos/Trilinos/master_merge_20200619…
Browse files Browse the repository at this point in the history
…_000614

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20200619_000614 branch to master
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Jun 19, 2020
2 parents 6e5c6c9 + 75c3d45 commit bb651f7
Show file tree
Hide file tree
Showing 37 changed files with 371 additions and 121 deletions.
1 change: 1 addition & 0 deletions cmake/std/atdm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ TRIBITS_ADD_TEST_DIRECTORIES(van1-tx2)
TRIBITS_ADD_TEST_DIRECTORIES(ats1)
TRIBITS_ADD_TEST_DIRECTORIES(ats2)
TRIBITS_ADD_TEST_DIRECTORIES(cts1)
TRIBITS_ADD_TEST_DIRECTORIES(cts1empire)
TRIBITS_PACKAGE_POSTPROCESS()
11 changes: 11 additions & 0 deletions cmake/std/atdm/cts1empire/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TRIBITS_ADD_ADVANCED_TEST( cts1empire_custom_builds_unit_tests
OVERALL_WORKING_DIRECTORY TEST_NAME
OVERALL_NUM_MPI_PROCS 1
TEST_0 CMND env
ARGS SHUNIT_COLOR=none ${CMAKE_CURRENT_SOURCE_DIR}/custom_builds_unit_tests.sh
PASS_REGULAR_EXPRESSION_ALL
"ERROR: A supported compiler was not selected for 'cts1empire' env - anything-intell"
"Ran 1 test"
"[^]OK[$]"
ALWAYS_FAIL_ON_NONZERO_RETURN
)
13 changes: 7 additions & 6 deletions cmake/std/atdm/cts1empire/custom_builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@

# Custom compiler selection logic

if [[ $ATDM_CONFIG_BUILD_NAME == *"intel-18.0.2-openmpi-4.0.1"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"intel-18.0.2_openmpi-4.0.1"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"intel-18.0.2"* ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"intel" ]] \
|| [[ $ATDM_CONFIG_BUILD_NAME == *"default" ]] \
if atdm_match_any_buildname_keyword \
intel-18.0.2-openmpi-4.0.1 \
intel-18.0.2_openmpi-4.0.1 \
intel-18.0.2 \
intel \
default \
; then
export ATDM_CONFIG_COMPILER=INTEL-18.0.2_OPENMPI-4.0.1
else
echo
echo "***"
echo "*** ERROR: A supported compiler was not selected for 'cts1empire' env"
echo "*** ERROR: A supported compiler was not selected for 'cts1empire' env - $ATDM_CONFIG_BUILD_NAME"
echo "***"
echo "*** Supported compilers include:"
echo "***"
Expand Down
55 changes: 55 additions & 0 deletions cmake/std/atdm/cts1empire/custom_builds_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

if [[ "$(uname)" == "Darwin" ]]; then
ATDM_CONFIG_SCRIPT_DIR=".."
source "${ATDM_CONFIG_SCRIPT_DIR}/utils/define_atdm_match_keyword.sh"
SHUNIT2_DIR="${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2"
else
CURRENT_SCRIPTS_DIR=`echo $BASH_SOURCE | sed "s/\(.*\)\/.*\.sh/\1/g"`
ATDM_CONFIG_SCRIPT_DIR=`readlink -f ${CURRENT_SCRIPTS_DIR}/..`
SHUNIT2_DIR=`readlink -f ${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2`
fi

#
# Test compiler parsing
#

testAll() {

ATDM_CONFIG_SYSTEM_DIR=${ATDM_CONFIG_SCRIPT_DIR}/cts1empire

ATDM_CONFIG_BUILD_NAME=before-intel-18.0.2-openmpi-4.0.1_after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} INTEL-18.0.2_OPENMPI-4.0.1 ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before-intel-18.0.2_openmpi-4.0.1-after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} INTEL-18.0.2_OPENMPI-4.0.1 ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before_intel-18.0.2-after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} INTEL-18.0.2_OPENMPI-4.0.1 ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=default
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} INTEL-18.0.2_OPENMPI-4.0.1 ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=before-intel-after
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} INTEL-18.0.2_OPENMPI-4.0.1 ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=BEFORE-INTEL-AFTER
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} INTEL-18.0.2_OPENMPI-4.0.1 ${ATDM_CONFIG_COMPILER}

ATDM_CONFIG_BUILD_NAME=anything-intell
. ${ATDM_CONFIG_SCRIPT_DIR}/utils/set_build_options.sh
${_ASSERT_EQUALS_} DEFAULT ${ATDM_CONFIG_COMPILER}

}


#
# Run the unit tests
#
. ${SHUNIT2_DIR}/shunit2
1 change: 1 addition & 0 deletions packages/galeri/src-xpetra/Galeri_Elasticity2DProblem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ namespace Galeri {
R(0,0) = R(1,3) = R(2,1) = R(2,2) = 1;

this->A_ = MatrixTraits<Map,Matrix>::Build(this->Map_, 8*numNodesPerElem);
this->A_->setObjectLabel(this->getObjectLabel());

SC one = TST::one(), zero = TST::zero();
SerialDenseMatrix<LO,SC> prevKE(numDofPerElem, numDofPerElem), prevElementNodes(numNodesPerElem, Teuchos::as<LO>(nDim_)); // cache
Expand Down
1 change: 1 addition & 0 deletions packages/galeri/src-xpetra/Galeri_Elasticity3DProblem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ namespace Galeri {
R(0,0) = R(1,4) = R(2,8) = R(3,1) = R(3,3) = R(4,5) = R(4,7) = R(5,2) = R(5,6) = 1;

this->A_ = MatrixTraits<Map,Matrix>::Build(this->Map_, numNodesPerElem * 8 * numDofPerElem);
this->A_->setObjectLabel(this->getObjectLabel());

SC one = Teuchos::ScalarTraits<SC>::one(), zero = Teuchos::ScalarTraits<SC>::zero();
SerialDenseMatrix<LO,SC> prevKE(numDofPerElem, numDofPerElem), prevElementNodes(numNodesPerElem, nDim_); // cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperBackwardEuler.hpp"


namespace Tempus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
#define Tempus_StepperBackwardEulerModifierDefault_hpp

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperBackwardEulerModifierBase.hpp"

// Applications can uncomment this include in their implementation,
// if they need access to the stepper methods.
//#include "Tempus_StepperBackwardEuler.hpp"


namespace Tempus {

/** \brief Default modifier for StepperBackwardEuler.
*
* The default modifier provides no-op functionality for the modifier.
* See StepperBackwardEulerModifierBase for details on the algorithm.
*
* Applications can copy this implementation, rename, implement their
* action, and set on the stepper to get app-specific functionality.
*/
template<class Scalar>
class StepperBackwardEulerModifierDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define Tempus_StepperBackwardEulerModifierX_hpp

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperBackwardEulerModifierXBase.hpp"


Expand All @@ -20,6 +19,9 @@ namespace Tempus {
*
* The default provides no-op functionality for ModifierX.
* See StepperBackwardEulerModifierXBase for details on the algorithm.
*
* Applications can copy this implementation, rename, implement their
* action, and set on the stepper to get app-specific functionality.
*/
template<class Scalar>
class StepperBackwardEulerModifierXDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
#define Tempus_StepperBackwardEulerObserverDefault_hpp

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperBackwardEulerObserverBase.hpp"

// Applications can uncomment this include in their implementation,
// if they need access to the stepper methods.
//#include "Tempus_StepperBackwardEuler.hpp"


namespace Tempus {

/** \brief Default observer for StepperBackwardEuler.
*
* The default observer provides no-op functionality for the observer.
* See StepperBackwardEulerObserverBase for details on the algorithm.
*
* Applications can copy this implementation, rename, implement their
* action, and set on the stepper to get app-specific functionality.
*/
template<class Scalar>
class StepperBackwardEulerObserverDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperForwardEuler.hpp"


namespace Tempus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
#define Tempus_StepperForwardEulerModifierDefault_hpp

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperForwardEulerModifierBase.hpp"

// Applications can uncomment this include in their implementation,
// if they need access to the stepper methods.
//#include "Tempus_StepperForwardEuler.hpp"


namespace Tempus {

/** \brief Default modifier for StepperForwardEuler.
*
* The default modifier provides no-op functionality for the modifier.
* See StepperForwardEulerModifierBase for details on the algorithm.
*
* Applications can copy this implementation, rename, implement their
* action, and set on the stepper to get app-specific functionality.
*/
template<class Scalar>
class StepperForwardEulerModifierDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define Tempus_StepperForwardEulerModifierX_hpp

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperForwardEulerModifierXBase.hpp"


Expand All @@ -20,6 +19,9 @@ namespace Tempus {
*
* The default provides no-op functionality for ModifierX.
* See StepperForwardEulerModifierXBase for details on the algorithm.
*
* Applications can copy this implementation, rename, implement their
* action, and set on the stepper to get app-specific functionality.
*/
template<class Scalar>
class StepperForwardEulerModifierXDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@
#define Tempus_StepperForwardEulerObserverDefault_hpp

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperForwardEulerObserverBase.hpp"

// Applications can uncomment this include in their implementation,
// if they need access to the stepper methods.
//#include "Tempus_StepperForwardEuler.hpp"


namespace Tempus {

/** \brief Default observer for StepperForwardEuler.
*
* The default observer provides no-op functionality for the observer.
* See StepperForwardEulerObserverBase for details on the algorithm.
*
* Applications can copy this implementation, rename, implement their
* action, and set on the stepper to get app-specific functionality.
*/
template<class Scalar>
class StepperForwardEulerObserverDefault
Expand Down
18 changes: 9 additions & 9 deletions packages/tempus/src/Tempus_StepperOperatorSplitAppAction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "Tempus_config.hpp"
#include "Tempus_SolutionHistory.hpp"
#include "Tempus_StepperOperatorSplit.hpp"


namespace Tempus {

Expand All @@ -22,26 +22,26 @@ template<class Scalar> class StepperOperatorSplit;
*
* This is a means for application developers to perform tasks
* during the time steps, e.g.,
* - Compute specific quantities
* - Output information
* - Compute specific quantities
* - Output information
* - "Massage" the working solution state
* - ...
*
* <b>Design Considerations</b>
* - StepperOperatorSplitAppAction is not stateless! Developers may touch the
* solution state! Developers need to be careful not to break the
* restart (checkpoint) capability.
* restart (checkpoint) capability.
*/
template<class Scalar>
class StepperOperatorSplitAppAction
{
public:

enum ACTION_LOCATION {
BEGIN_STEP, ///< At the beginning of the step.
BEFORE_STEPPER, ///< Before a stepper evaluation.
AFTER_STEPPER, ///< After a stepper evaluation.
END_STEP ///< At the end of the step.
BEGIN_STEP, ///< At the beginning of the step.
BEFORE_STEPPER, ///< Before a stepper evaluation.
AFTER_STEPPER, ///< After a stepper evaluation.
END_STEP ///< At the end of the step.
};

/// Constructor
Expand All @@ -50,7 +50,7 @@ class StepperOperatorSplitAppAction
/// Destructor
virtual ~StepperOperatorSplitAppAction(){}

/// Execute application action for OperatorSplit Stepper.
/// Execute application action for OperatorSplit Stepper.
virtual void execute(
Teuchos::RCP<SolutionHistory<Scalar> > sh,
Teuchos::RCP<StepperOperatorSplit<Scalar> > stepper,
Expand Down
44 changes: 22 additions & 22 deletions packages/tempus/src/Tempus_StepperOperatorSplitModifierBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@

namespace Tempus {

/** \brief Base modifier for OperatorSplit.
*
* This class provides a means to modify values (e.g., solution variables
* through SolutionHistory, and stepper member data through the Stepper),
* and can be very powerful and easy to make changes to the stepper and
* the solution.
*
* Users deriving from this class can access a lot of data, and it is
* expected that those users know what changes are allowable without
* affecting the Stepper correctness, performance, accuracy and stability.
* Thus the user should be careful when accessing data through classes
* derived from the default modifier (i.e., USER BEWARE!!).
*
/** \brief Base modifier for OperatorSplit.
*
* This class provides a means to modify values (e.g., solution variables
* through SolutionHistory, and stepper member data through the Stepper),
* and can be very powerful and easy to make changes to the stepper and
* the solution.
*
* Users deriving from this class can access a lot of data, and it is
* expected that those users know what changes are allowable without
* affecting the Stepper correctness, performance, accuracy and stability.
* Thus the user should be careful when accessing data through classes
* derived from the default modifier (i.e., USER BEWARE!!).
*
*/
template<class Scalar>
class StepperOperatorSplitModifierBase
: virtual public Tempus::StepperOperatorSplitAppAction<Scalar>
{
private:
/* \brief Adaptor execute function
*
* This is an adaptor function to bridge between the AppAction
* interface and the Modifier interface. It is meant to be private
* and non-virtual as deriving from this class should only need to
* implement the modify function.
*
* For the Modifier interface, this adaptor is a "simple pass through".
/* \brief Adaptor execute function
*
* This is an adaptor function to bridge between the AppAction
* interface and the Modifier interface. It is meant to be private
* and non-virtual as deriving from this class should only need to
* implement the modify function.
*
* For the Modifier interface, this adaptor is a "simple pass through".
*/
void execute(
Teuchos::RCP<SolutionHistory<Scalar> > sh,
Teuchos::RCP<StepperOperatorSplit<Scalar> > stepper,
const typename StepperOperatorSplitAppAction<Scalar>::ACTION_LOCATION actLoc)
{ this->modify(sh, stepper, actLoc); }
public:
/// Modify OperatorSplit Stepper.
/// Modify OperatorSplit Stepper.
virtual void modify(
Teuchos::RCP<SolutionHistory<Scalar> > /* sh */,
Teuchos::RCP<StepperOperatorSplit<Scalar> > /* stepper */,
Expand Down
Loading

0 comments on commit bb651f7

Please sign in to comment.