forked from trilinos/Trilinos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'trilinos/Trilinos:develop' (81c48c3) into 'tcad-charon/Trilino…
…s:develop' (8ca364d). * trilinos-develop: Intrepid2: ensure that various derived basis classes have unique names returned by getName(). (trilinos#7529) Summary: ATDM: Implement feedback from trilinos#7518 Piro: rename the space of the multipliers Thyra: rename the directions used in the Hessian vector products and the space of the multipliers Update ninja to 1.10.0 Move to CMake 3.17.1 Thyra: remove get_f_dual_space() from Tempus and Rythmos Thyra: rename Delta_x to delta_x and Delta_p to delta_p Thyra: remove the default implementation of the member functions related to the Hessian from Thyra_ModelEvaluator.hpp Thyra: Add Hessian Objects to ME Set Werror globally for 8.3
- Loading branch information
Showing
59 changed files
with
4,341 additions
and
854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
cmake/std/atdm/test/unit_tests/atdm_config_helper_funcs_unit_test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/bin/bash | ||
|
||
CURRENT_SCRIPTS_DIR=`echo $BASH_SOURCE | sed "s/\(.*\)\/.*\.sh/\1/g"` | ||
|
||
if [[ "$(uname)" == "Darwin" ]]; then | ||
ATDM_CONFIG_SCRIPT_DIR="../.." | ||
ATDM_UTIL_SCRIPT_ATDM_CONFIG_HELPER_FUNCS="${ATDM_CONFIG_SCRIPT_DIR}/utils/atdm_config_helper_funcs.sh" | ||
SHUNIT2_DIR="${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2" | ||
else | ||
ATDM_CONFIG_SCRIPT_DIR=`readlink -f ${CURRENT_SCRIPTS_DIR}/../..` | ||
ATDM_UTIL_SCRIPT_ATDM_CONFIG_HELPER_FUNCS=`readlink -f ${ATDM_CONFIG_SCRIPT_DIR}/utils/atdm_config_helper_funcs.sh` | ||
SHUNIT2_DIR=`readlink -f ${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2` | ||
fi | ||
|
||
source ${ATDM_UTIL_SCRIPT_ATDM_CONFIG_HELPER_FUNCS} | ||
# | ||
# Test atdm utility functions | ||
# | ||
|
||
test_atdm_remove_substrings_from_env_var() { | ||
for DELIM in ":" "," "-" "_"; do | ||
# Don't remove anything from path | ||
EXPECTED_ENV_VAR="/paths" | ||
ENV_VAR="$EXPECTED_ENV_VAR" | ||
STRINGS="/test/path1" | ||
atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS" | ||
${_ASSERT_EQUALS_} ${EXPECTED_ENV_VAR} ${ENV_VAR} | ||
|
||
# Remove dir from end of path | ||
EXPECTED_ENV_VAR="/paths" | ||
ENV_VAR="$EXPECTED_ENV_VAR$DELIM/test/path1" | ||
STRINGS="/test/path1" | ||
atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS" | ||
${_ASSERT_EQUALS_} ${EXPECTED_ENV_VAR} ${ENV_VAR} | ||
|
||
# Remove dir at beginning of path | ||
EXPECTED_ENV_VAR="/paths" | ||
ENV_VAR="/test/path1$DELIM$EXPECTED_ENV_VAR" | ||
STRINGS="/test/path1" | ||
atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS" | ||
${_ASSERT_EQUALS_} ${EXPECTED_ENV_VAR} ${ENV_VAR} | ||
|
||
# Remove dir at beginning of path with similar path beside it | ||
EXPECTED_ENV_VAR="/paths$DELIM/paths2" | ||
ENV_VAR="/test/path1$DELIM$EXPECTED_ENV_VAR" | ||
STRINGS="/test/path1" | ||
atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS" | ||
${_ASSERT_EQUALS_} ${EXPECTED_ENV_VAR} ${ENV_VAR} | ||
|
||
# Remove dirs at beginning and end of path | ||
EXPECTED_ENV_VAR="/paths" | ||
ENV_VAR="/test/path1$DELIM$EXPECTED_ENV_VAR$DELIM/test/path2" | ||
STRINGS="/test/path1 /test/path2" | ||
atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS" | ||
${_ASSERT_EQUALS_} ${EXPECTED_ENV_VAR} ${ENV_VAR} | ||
|
||
# Only one dir matches to be removed (other non-matching dir is ignored) | ||
EXPECTED_ENV_VAR="/paths" | ||
ENV_VAR="/test/path2$DELIM/test/path1$DELIM$EXPECTED_ENV_VAR" | ||
STRINGS="/test/path1 /test/path2" | ||
atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS" | ||
${_ASSERT_EQUALS_} ${EXPECTED_ENV_VAR} ${ENV_VAR} | ||
done | ||
|
||
for DELIM in ";" "." "/" " "; do | ||
RET=$(atdm_remove_substrings_from_env_var ENV_VAR "$DELIM" "$STRINGS") | ||
assertEquals "ERROR: atdm_remove_substrings_from_env_var: \"$DELIM\" is an invalid delimiter." "$RET" | ||
done | ||
} | ||
|
||
# | ||
# Run the unit tests | ||
# | ||
. ${SHUNIT2_DIR}/shunit2 |
70 changes: 70 additions & 0 deletions
70
cmake/std/atdm/test/unit_tests/get_known_system_info_unit_test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
CURRENT_SCRIPTS_DIR=`echo $BASH_SOURCE | sed "s/\(.*\)\/.*\.sh/\1/g"` | ||
|
||
if [[ "$(uname)" == "Darwin" ]]; then | ||
ATDM_CONFIG_SCRIPT_DIR="../.." | ||
ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO="${ATDM_CONFIG_SCRIPT_DIR}/utils/get_known_system_info.sh" | ||
SHUNIT2_DIR="${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2" | ||
else | ||
ATDM_CONFIG_SCRIPT_DIR=`readlink -f ${CURRENT_SCRIPTS_DIR}/../..` | ||
ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO=`readlink -f ${ATDM_CONFIG_SCRIPT_DIR}/utils/get_known_system_info.sh` | ||
SHUNIT2_DIR=`readlink -f ${ATDM_CONFIG_SCRIPT_DIR}/../../../commonTools/test/shunit2` | ||
fi | ||
|
||
# | ||
# Test atdm get_known_system_info script | ||
# | ||
test_atdm_get_known_system_info() { | ||
# TODO: D.2 needs to be tested by setting these values: | ||
SNLSYSTEM= | ||
SEMS_PLATFORM= | ||
ATDM_SYSTEM_NAME= | ||
SNLCLUSTER= | ||
|
||
# Get the good ATDM_KNOWN_SYSTEM_NAMES_LIST | ||
ATDM_CONFIG_BUILD_NAME=unit_test | ||
ATDM_CONFIG_DISABLE_WARNINGS=ON | ||
source ${ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO} | ||
|
||
# Check that all known system names pass | ||
for ATDM_CONFIG_BUILD_NAME in ${ATDM_KNOWN_SYSTEM_NAMES_LIST[@]}; do | ||
ATDM_CONFIG_GET_KNOW_SYSTEM_INFO_REAL_HOSTNAME_OVERRIDE_FOR_UNIT_TESTING=$ATDM_CONFIG_BUILD_NAME | ||
RET=$(source ${ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO}) | ||
assertEquals "Hostname '$ATDM_CONFIG_BUILD_NAME' matches known ATDM host '$ATDM_CONFIG_BUILD_NAME' and system '$ATDM_CONFIG_BUILD_NAME'" "$RET" | ||
done | ||
|
||
# Set the bad ATDM_KNOWN_SYSTEM_NAMES | ||
ATDM_KNOWN_SYSTEM_NAMES_LIST=( | ||
dne-name1 | ||
dne-name2 | ||
dne-name3 | ||
) | ||
|
||
# Check a few bad systems names for failure | ||
for ATDM_CONFIG_BUILD_NAME in ${ATDM_KNOWN_SYSTEM_NAMES_LIST[@]}; do | ||
ATDM_CONFIG_GET_KNOW_SYSTEM_INFO_REAL_HOSTNAME_OVERRIDE_FOR_UNIT_TESTING=$ATDM_CONFIG_BUILD_NAME | ||
source ${ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO} | ||
assertEquals "" "$ATDM_SYSTEM_NAME" | ||
assertEquals "$ATDM_CONFIG_BUILD_NAME" "$realHostname" | ||
done | ||
|
||
# Ensure that cts1empire is the default on cts1 | ||
ATDM_CONFIG_BUILD_NAME=default | ||
ATDM_CONFIG_GET_KNOW_SYSTEM_INFO_REAL_HOSTNAME_OVERRIDE_FOR_UNIT_TESTING=$ATDM_CONFIG_BUILD_NAME | ||
SNLSYSTEM=cts1 | ||
RET=$(source ${ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO}) | ||
assertEquals "Hostname '$ATDM_CONFIG_BUILD_NAME' matches known ATDM host '$ATDM_CONFIG_BUILD_NAME' and system 'cts1empire'" "$RET" | ||
|
||
# Ensure that cts1 is still selected when it's in the build name | ||
ATDM_CONFIG_BUILD_NAME=cts1-default | ||
ATDM_CONFIG_GET_KNOW_SYSTEM_INFO_REAL_HOSTNAME_OVERRIDE_FOR_UNIT_TESTING=$ATDM_CONFIG_BUILD_NAME | ||
SNLSYSTEM=cts1 | ||
RET=$(source ${ATDM_UTIL_SCRIPT_GET_KNOWN_SYSTEM_INFO}) | ||
assertEquals "Hostname '$ATDM_CONFIG_BUILD_NAME' matches known ATDM host '$ATDM_CONFIG_BUILD_NAME' and system 'cts1'" "$RET" | ||
} | ||
|
||
# | ||
# Run the unit tests | ||
# | ||
. ${SHUNIT2_DIR}/shunit2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.