From a704cd4c440089fdba8c128eb60eb4ba22084bb3 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 20 Feb 2024 18:00:36 -0700 Subject: [PATCH 1/7] Added new attribute to PR config driver for custom dashboard build name Added a new attribute to `TrilinosPRConfigurationBase` class that is used for returning a custom dashboard build name from the property `pullrequest_build_name`. Currently, `pullrequest_build_name` will return the new dashboard build name if `pullrequest_cdash_track` is set to Nightly. This will be used to trial a new set of shortened genconfig build names posted to CDash ONLY for the nightly builds. --- .../TrilinosPRConfigurationBase.py | 13 +++++++++++++ .../test_TrilinosPRConfigurationBase.py | 16 ++++++++++++++++ .../test_TrilinosPRConfigurationInstallation.py | 1 + .../test_TrilinosPRConfigurationStandard.py | 1 + 4 files changed, 31 insertions(+) diff --git a/packages/framework/pr_tools/trilinosprhelpers/TrilinosPRConfigurationBase.py b/packages/framework/pr_tools/trilinosprhelpers/TrilinosPRConfigurationBase.py index b3bfbb8d66c9..12f8e00bbd9e 100644 --- a/packages/framework/pr_tools/trilinosprhelpers/TrilinosPRConfigurationBase.py +++ b/packages/framework/pr_tools/trilinosprhelpers/TrilinosPRConfigurationBase.py @@ -46,6 +46,8 @@ class TrilinosPRConfigurationBase(object): arg_pr_config_file: The config.ini file that specifies the configuration to load. arg_pr_jenkins_job_name: The Jenkins Job Name. arg_ccache_enable: Enable ccache. + arg_dashboard_build_name: A shortened genconfig build name + for posting to a testing dashboard. filename_subprojects: The subprojects file. working_directory_ctest: Gen. working dir where TFW_testing_single_configure_prototype is executed from. @@ -299,6 +301,14 @@ def arg_pr_genconfig_job_name(self): """ return self.args.genconfig_build_name + @property + def arg_dashboard_build_name(self): + """ + The simplified genconfig build name containing only the + special attributes of the full build name. + Default is to use the value in args.dashboard_build_name. + """ + return self.args.dashboard_build_name @property def arg_filename_subprojects(self): @@ -474,6 +484,8 @@ def pullrequest_build_name(self): """ if self.arg_pullrequest_cdash_track == "Pull Request": output = "PR-{}-test-{}-{}".format(self.arg_pullrequest_number, self.arg_pr_genconfig_job_name, self.arg_jenkins_job_number) + elif self.arg_pullrequest_cdash_track == "Nightly": + output = self.arg_dashboard_build_name else: output = self.arg_pr_genconfig_job_name return output @@ -698,6 +710,7 @@ def prepare_test(self): self.message("--- arg_pr_gen_config_file = {}".format(self.arg_pr_gen_config_file)) self.message("--- arg_pr_jenkins_job_name = {}".format(self.arg_pr_jenkins_job_name)) self.message("--- arg_pr_genconfig_job_name = {}".format(self.arg_pr_genconfig_job_name)) + self.message("--- arg_dashboard_build_name = {}".format(self.arg_dashboard_build_name)) self.message("--- arg_pullrequest_number = {}".format(self.arg_pullrequest_number)) self.message("--- arg_pullrequest_cdash_track = {}".format(self.arg_pullrequest_cdash_track)) self.message("--- arg_req_mem_per_core = {}".format(self.arg_req_mem_per_core)) diff --git a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py index f8c9bc3bd178..c7c960a8c062 100755 --- a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py +++ b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py @@ -212,6 +212,7 @@ def dummy_args(self): target_branch_name="develop", pullrequest_build_name="Trilinos-pullrequest-gcc-7.2.0", genconfig_build_name="rhel7_sems-gnu-7.2.0-openmpi-1.10.1-openmp_release_static_no-kokkos-arch_no-asan_no-complex_no-fpic_mpi_no-pt_no-rdc_no-package-enables", + dashboard_build_name="gnu-7.2.0-openmpi-1.10.1_release_static_openmp", jenkins_job_number=99, pullrequest_number='0000', pullrequest_cdash_track="Pull Request", @@ -266,6 +267,12 @@ def dummy_args_non_pr_track(self): return args + def dummy_args_nightly_track(self): + args = copy.deepcopy(self.dummy_args()) + args.pullrequest_cdash_track = "Nightly" + return args + + def dummy_args_master_pass(self): """ Modify arguments to test a develop->master with a valid @@ -357,6 +364,15 @@ def test_TrilinosPRConfigurationBaseBuildNameNonPRTrack(self): self.assertEqual(build_name, expected_build_name) + def test_TrilinosPRConfigurationBaseBuildNameNightlyTrack(self): + args = self.dummy_args_nightly_track() + pr_config = trilinosprhelpers.TrilinosPRConfigurationBase(args) + build_name = pr_config.pullrequest_build_name + print("--- build_name = {}".format(build_name)) + expected_build_name = args.dashboard_build_name + self.assertEqual(build_name, expected_build_name) + + def test_TrilinosPRConfigurationBaseDashboardModelPRTrack(self): args = self.dummy_args() pr_config = trilinosprhelpers.TrilinosPRConfigurationBase(args) diff --git a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationInstallation.py b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationInstallation.py index d20b21afed48..09c311c156a6 100755 --- a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationInstallation.py +++ b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationInstallation.py @@ -155,6 +155,7 @@ def dummy_args(self): target_branch_name="develop", pullrequest_build_name="Trilinos-pullrequest-gcc-8.3.0-installation-testing", genconfig_build_name="rhel7_sems-gnu-8.3.0-openmpi-1.10.1-openmp_release-debug_static_no-kokkos-arch_no-asan_no-complex_no-fpic_mpi_no-pt_no-rdc_trilinos-pr", + dashboard_build_name="gnu-7.2.0-openmpi-1.10.1_release-debug_shared_openmp", pullrequest_cdash_track="Pull Request", jenkins_job_number=99, pullrequest_number='0000', diff --git a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationStandard.py b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationStandard.py index 3a126c40c56a..31723f8bb778 100755 --- a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationStandard.py +++ b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationStandard.py @@ -152,6 +152,7 @@ def dummy_args(self): target_branch_name="develop", pullrequest_build_name="Trilinos-pullrequest-gcc-7.2.0", genconfig_build_name="rhel7_sems-gnu-7.2.0-openmpi-1.10.1-openmp_release-debug_shared_no-kokkos-arch_no-asan_no-complex_no-fpic_mpi_no-pt_no-rdc_trilinos-pr", + dashboard_build_name="gnu-7.2.0-openmpi-1.10.1_release-debug_shared_openmp", pullrequest_cdash_track="Pull Request", jenkins_job_number=99, pullrequest_number='0000', From 042f2b17367bd468f7e21e81dd51efe221a90217 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 20 Feb 2024 18:15:03 -0700 Subject: [PATCH 2/7] Added new argument --dashboard-build-name to PR test driver Added argument `--dashboard-build-name` to `PullRequestLinuxDriverTest.py` as needed by `TrilinosPRConfigurationBase` driver class. --- packages/framework/pr_tools/PullRequestLinuxDriverTest.py | 8 ++++++++ .../pr_tools/unittests/test_PullRequestLinuxDriverTest.py | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/packages/framework/pr_tools/PullRequestLinuxDriverTest.py b/packages/framework/pr_tools/PullRequestLinuxDriverTest.py index 3a48148242b8..f571478bdd4f 100755 --- a/packages/framework/pr_tools/PullRequestLinuxDriverTest.py +++ b/packages/framework/pr_tools/PullRequestLinuxDriverTest.py @@ -109,6 +109,13 @@ def parse_args(): help='The Jenkins build number', required=True) + optional.add_argument('--dashboard-build-name', + dest="dashboard_build_name", + action='store', + default="UNKNOWN", + help='The build name posted by ctest to a dashboard', + required=False) + optional.add_argument('--source-dir', dest="source_dir", action='store', @@ -280,6 +287,7 @@ def parse_args(): print("| - [O] test-mode : {test_mode}".format(**vars(arguments))) print("| - [O] workspace-dir : {workspace_dir}".format(**vars(arguments))) print("| - [O] extra_configure_args : {extra_configure_args}".format(**vars(arguments))) + print("| - [O] dashboard_build_name : {dashboard_build_name}".format(**vars(arguments))) #print("| - [O] : {}".format(**vars(arguments))) print("+" + "="*78 + "+") diff --git a/packages/framework/pr_tools/unittests/test_PullRequestLinuxDriverTest.py b/packages/framework/pr_tools/unittests/test_PullRequestLinuxDriverTest.py index b9ab0e2e5e14..c79d48a89594 100755 --- a/packages/framework/pr_tools/unittests/test_PullRequestLinuxDriverTest.py +++ b/packages/framework/pr_tools/unittests/test_PullRequestLinuxDriverTest.py @@ -67,6 +67,7 @@ def setUp(self): target_branch_name='real_trash', pullrequest_build_name='Some_odd_compiler', genconfig_build_name='Some_odd_compiler_and_options', + dashboard_build_name='UNKNOWN', pullrequest_number='4242', jenkins_job_number='2424', source_dir='UNKNOWN', @@ -121,6 +122,7 @@ def setUp(self): --genconfig-build-name GENCONFIG_BUILD_NAME --pullrequest-number PULLREQUEST_NUMBER --jenkins-job-number JENKINS_JOB_NUMBER + [--dashboard-build-name DASHBOARD_BUILD_NAME] [--source-dir SOURCE_DIR] [--build-dir BUILD_DIR] [--use-explicit-cachefile] [--ctest-driver CTEST_DRIVER] [--ctest-drop-site CTEST_DROP_SITE] @@ -159,6 +161,8 @@ def setUp(self): The Jenkins build number Optional Arguments: + --dashboard-build-name DASHBOARD_BUILD_NAME + The build name posted by ctest to a dashboard --source-dir SOURCE_DIR Directory containing the source code to compile/test. --build-dir BUILD_DIR @@ -227,6 +231,7 @@ def setUp(self): --genconfig-build-name GENCONFIG_BUILD_NAME --pullrequest-number PULLREQUEST_NUMBER --jenkins-job-number JENKINS_JOB_NUMBER + [--dashboard-build-name DASHBOARD_BUILD_NAME] [--source-dir SOURCE_DIR] [--build-dir BUILD_DIR] [--use-explicit-cachefile] [--ctest-driver CTEST_DRIVER] [--ctest-drop-site CTEST_DROP_SITE] From 9bd04b9afdeab2dacf2ad14abe43576af464a60f Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 20 Feb 2024 18:18:09 -0700 Subject: [PATCH 3/7] Added reading of `DASHBOARD_BUILD_NAME` to PR driver bash script Add reading of `DASHBOARD_BUILD_NAME` to PR testing driver script `PullRequestLinuxDriver.sh`. Since this is being trialed for nightly builds only, reading this environment variable will not exit the script if its value is not set to disrupt PR testing for other groups. However, this assumes that this environment variable is set for nightly Jenkins environments. This will need to be checked before merging. --- packages/framework/pr_tools/PullRequestLinuxDriver.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/framework/pr_tools/PullRequestLinuxDriver.sh b/packages/framework/pr_tools/PullRequestLinuxDriver.sh index ae17798d29fe..cecf35f9b989 100755 --- a/packages/framework/pr_tools/PullRequestLinuxDriver.sh +++ b/packages/framework/pr_tools/PullRequestLinuxDriver.sh @@ -210,6 +210,7 @@ test_cmd_options=( --build-dir=${TRILINOS_BUILD_DIR:?} --ctest-driver=${WORKSPACE:?}/Trilinos/cmake/SimpleTesting/cmake/ctest-driver.cmake --ctest-drop-site=${TRILINOS_CTEST_DROP_SITE:?} + --dashboard-build-name=${DASHBOARD_BUILD_NAME} ) if [[ ${on_kokkos_develop} == "1" ]] From 49a6b7df27b5efbc6c4e3d778b69e88796c84de1 Mon Sep 17 00:00:00 2001 From: Anderson Date: Wed, 21 Feb 2024 14:44:35 -0700 Subject: [PATCH 4/7] Removed print message from unittest User story: TRILFRAME-620 --- .../unittests/test_TrilinosPRConfigurationBase.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py index c7c960a8c062..a6994abd0f7e 100755 --- a/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py +++ b/packages/framework/pr_tools/trilinosprhelpers/unittests/test_TrilinosPRConfigurationBase.py @@ -368,7 +368,6 @@ def test_TrilinosPRConfigurationBaseBuildNameNightlyTrack(self): args = self.dummy_args_nightly_track() pr_config = trilinosprhelpers.TrilinosPRConfigurationBase(args) build_name = pr_config.pullrequest_build_name - print("--- build_name = {}".format(build_name)) expected_build_name = args.dashboard_build_name self.assertEqual(build_name, expected_build_name) From e0ddc47e079823906f3d8c4d6361da4b2d469e6c Mon Sep 17 00:00:00 2001 From: Anderson Date: Wed, 21 Feb 2024 17:34:46 -0700 Subject: [PATCH 5/7] Added uploading of file containing genconfig string to dashboard Upload a file named `genconfig_build_name.txt` to testing dashboard. This file writing and upload is grouped with the writing of `configure_command.txt` and is controlled with the `skip_upload_config_files` option from `ctest-driver.cmake`. User story: TRILFRAME-620 --- cmake/SimpleTesting/cmake/ctest-cdash-setup.cmake | 6 +++--- cmake/SimpleTesting/cmake/ctest-common.cmake | 1 + cmake/SimpleTesting/cmake/ctest-functions.cmake | 11 +++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake/SimpleTesting/cmake/ctest-cdash-setup.cmake b/cmake/SimpleTesting/cmake/ctest-cdash-setup.cmake index 6e487806d0c4..d1e28d458280 100644 --- a/cmake/SimpleTesting/cmake/ctest-cdash-setup.cmake +++ b/cmake/SimpleTesting/cmake/ctest-cdash-setup.cmake @@ -65,14 +65,14 @@ endif() # Optionally upload the config files # TODO: Note how this works / what it's doing in CMake-land. -message(">>> Write `configure_command_file`:") +message(">>> Write `configure_command_file` and `genconfig_build_name_file`:") if(skip_upload_config_files) message(">>> - SKIPPED") else() message(">>> - WRITTEN") - #message(">>> - configure_command_file : ${configure_command_file}") - #message(">>> - CTEST_CONFIGURE_COMMAND: ${CTEST_CONFIGURE_COMMAND}") file(WRITE ${configure_command_file} ${CTEST_CONFIGURE_COMMAND}) + file(WRITE ${genconfig_build_name_file} $ENV{GENCONFIG_BUILD_NAME}) + endif() message(">>>") diff --git a/cmake/SimpleTesting/cmake/ctest-common.cmake b/cmake/SimpleTesting/cmake/ctest-common.cmake index b000faca25d9..812e9ebfb3b9 100644 --- a/cmake/SimpleTesting/cmake/ctest-common.cmake +++ b/cmake/SimpleTesting/cmake/ctest-common.cmake @@ -158,6 +158,7 @@ set(CTEST_BUILD_FLAGS "-j${PARALLEL_LEVEL} -k 0") # * REQUIRES `CTEST_BINARY_DIRECTORY` to be set. if(NOT skip_upload_config_files) set(configure_command_file ${CTEST_BINARY_DIRECTORY}/configure_command.txt) + set(genconfig_build_name_file ${CTEST_BINARY_DIRECTORY}/genconfig_build_name.txt) endif() diff --git a/cmake/SimpleTesting/cmake/ctest-functions.cmake b/cmake/SimpleTesting/cmake/ctest-functions.cmake index df53579c3b3f..97f1abb0e474 100644 --- a/cmake/SimpleTesting/cmake/ctest-functions.cmake +++ b/cmake/SimpleTesting/cmake/ctest-functions.cmake @@ -82,8 +82,14 @@ macro(submit_upload_config_files) if( NOT (skip_single_submit AND skip_by_parts_submit) ) message(">>> ctest_upload(FILES ${configure_command_file}") message(" ${configure_file}") - message(" ${package_enables_file} )") - ctest_upload(FILES ${configure_command_file} ${configure_file} ${package_enables_file}) + message(" ${package_enables_file}") + message(" ${genconfig_build_name_file})") + + ctest_upload(FILES ${configure_command_file} + ${configure_file} + ${package_enables_file} + ${genconfig_build_name_file}) + message(">>> ctest_submit(PARTS upload") message(" RETRY_COUNT ${ctest_submit_retry_count}") message(" RETRY_DELAY ${ctest_submit_retry_delay}") @@ -127,6 +133,7 @@ macro(print_options_list) message(">>> subproject_count = ${subproject_count}") message(">>> dashboard_model = ${dashboard_model}") message(">>> dashboard_track = ${dashboard_track}") + message(">>> genconfig_build_name_file= ${genconfig_build_name_file}") message(">>> configure_command_file = ${configure_command_file}") message(">>> configure_file = ${configure_file}") message(">>> build_root = ${build_root}") From 4255c59b388ee166a17a446b35b10ea9eb9fab2f Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Thu, 22 Feb 2024 08:50:29 -0700 Subject: [PATCH 6/7] MueLu: Fix bad view in GetMatrixDiagonal, silence warnings --- packages/muelu/src/Utils/MueLu_UtilitiesBase_def.hpp | 7 +++++-- packages/muelu/test/interface/CreateOperator.cpp | 11 ++++++----- packages/muelu/test/scaling/MatrixLoad.hpp | 6 +++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/muelu/src/Utils/MueLu_UtilitiesBase_def.hpp b/packages/muelu/src/Utils/MueLu_UtilitiesBase_def.hpp index e27fedd26abb..f11695d05936 100644 --- a/packages/muelu/src/Utils/MueLu_UtilitiesBase_def.hpp +++ b/packages/muelu/src/Utils/MueLu_UtilitiesBase_def.hpp @@ -200,8 +200,8 @@ UtilitiesBase:: const CrsMatrixWrap* crsOp = dynamic_cast(&A); if ((crsOp != NULL) && (rowMap->lib() == Xpetra::UseTpetra)) { using local_vector_type = typename Vector::dual_view_type::t_dev_um; - using execution_space = typename local_vector_type::execution_space; - Kokkos::View offsets("offsets", rowMap->getLocalNumElements()); + using device_type = typename CrsGraph::device_type; + Kokkos::View offsets("offsets", rowMap->getLocalNumElements()); crsOp->getCrsGraph()->getLocalDiagOffsets(offsets); crsOp->getCrsMatrix()->getLocalDiagCopy(*diag, offsets); } else { @@ -1012,6 +1012,9 @@ DetectDirichletRows_kokkos(const Xpetra::Matrix& A, Kokkos::deep_copy(boundaryNodes2, boundaryNodes); return boundaryNodes2; } + // CAG: No idea why this is needed to avoid "warning: missing return statement at end of non-void function" + Kokkos::View dummy("dummy", 0); + return dummy; } template diff --git a/packages/muelu/test/interface/CreateOperator.cpp b/packages/muelu/test/interface/CreateOperator.cpp index ea46ecf25665..3896cfcd79ae 100644 --- a/packages/muelu/test/interface/CreateOperator.cpp +++ b/packages/muelu/test/interface/CreateOperator.cpp @@ -185,11 +185,11 @@ void run_sed(const std::string& pattern, const std::string& baseFile) { #ifdef __APPLE__ sed_pref = sed_pref + "\"\" "; #endif - int ret_val = 0; - (void)ret_val; // suppress fscanf return value and unused variable warnings - ret_val = system((sed_pref + pattern + " " + baseFile + ".gold_filtered").c_str()); + ret_val = system((sed_pref + pattern + " " + baseFile + ".gold_filtered").c_str()); + TEUCHOS_ASSERT_EQUALITY(ret_val, 0); ret_val = system((sed_pref + pattern + " " + baseFile + ".out_filtered").c_str()); + TEUCHOS_ASSERT_EQUALITY(ret_val, 0); } bool compare_to_gold(int myRank, const std::string& baseFile) { @@ -198,9 +198,10 @@ bool compare_to_gold(int myRank, const std::string& baseFile) { // Create a copy of outputs std::string cmd = "cp -f "; int ret_val = 0; - (void)ret_val; // suppress fscanf return value and unused variable warnings - ret_val = system((cmd + baseFile + ".gold " + baseFile + ".gold_filtered").c_str()); + ret_val = system((cmd + baseFile + ".gold " + baseFile + ".gold_filtered").c_str()); + TEUCHOS_ASSERT_EQUALITY(ret_val, 0); ret_val = system((cmd + baseFile + ".out " + baseFile + ".out_filtered").c_str()); + TEUCHOS_ASSERT_EQUALITY(ret_val, 0); // Tpetra produces different eigenvalues in Chebyshev due to using // std::rand() for generating random vectors, which may be initialized diff --git a/packages/muelu/test/scaling/MatrixLoad.hpp b/packages/muelu/test/scaling/MatrixLoad.hpp index cce8daf684ef..d5634763cd27 100644 --- a/packages/muelu/test/scaling/MatrixLoad.hpp +++ b/packages/muelu/test/scaling/MatrixLoad.hpp @@ -290,7 +290,7 @@ void readUserBlks(const std::string& userBlkFileName, const std::string& smoothe if (mueluList.sublist(smootherOrCoarse + ": params").sublist("subdomain solver parameters").get("partitioner: type") == "user") { FILE* fp; int retVal; - int nBlks, nRows, nnzs, ch, row, col; + int nBlks, nRows, nnzs, row, col; int procId = comm->getRank(); double val; @@ -301,7 +301,7 @@ void readUserBlks(const std::string& userBlkFileName, const std::string& smoothe fp = fopen(&userBlkFileName[0], "r"); TEUCHOS_TEST_FOR_EXCEPTION(fp == NULL, std::runtime_error, userBlkFileName + " file not found"); - while ((ch = getc(fp) != '\n')) + while ((getc(fp) != '\n')) ; // read first line retVal = fscanf(fp, "%d %d %d\n", &nBlks, &nRows, &nnzs); @@ -367,7 +367,7 @@ void readUserBlks(const std::string& userBlkFileName, const std::string& smoothe fp = fopen(&userBlkFileName[0], "r"); TEUCHOS_TEST_FOR_EXCEPTION(fp == NULL, std::runtime_error, userBlkFileName + " file not found"); - while ((ch = getc(fp) != '\n')) + while ((getc(fp) != '\n')) ; retVal = fscanf(fp, "%d %d %d\n", &nBlks, &nRows, &nnzs); From d7a9832aaa32a009fac98c750d92cbf3591ebe65 Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Thu, 22 Feb 2024 09:00:13 -0700 Subject: [PATCH 7/7] MueLu: Fix build errors in research code --- .../research/caglusa/Xpetra_HierarchicalOperator_decl.hpp | 4 ++-- packages/muelu/research/graham/mf_example_01.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/muelu/research/caglusa/Xpetra_HierarchicalOperator_decl.hpp b/packages/muelu/research/caglusa/Xpetra_HierarchicalOperator_decl.hpp index f65d3a7a8bca..98910ac96fe5 100644 --- a/packages/muelu/research/caglusa/Xpetra_HierarchicalOperator_decl.hpp +++ b/packages/muelu/research/caglusa/Xpetra_HierarchicalOperator_decl.hpp @@ -37,12 +37,12 @@ class HierarchicalOperator : public TpetraOperator& params = Teuchos::null); //! Returns the Tpetra::Map object associated with the domain of this operator. - Teuchos::RCP getDomainMap() const { + const Teuchos::RCP getDomainMap() const { return toXpetra(op_->getDomainMap()); } //! Returns the Tpetra::Map object associated with the range of this operator. - Teuchos::RCP getRangeMap() const { + const Teuchos::RCP getRangeMap() const { return toXpetra(op_->getRangeMap()); } diff --git a/packages/muelu/research/graham/mf_example_01.cpp b/packages/muelu/research/graham/mf_example_01.cpp index d06286f63d92..51f2dd6b4540 100644 --- a/packages/muelu/research/graham/mf_example_01.cpp +++ b/packages/muelu/research/graham/mf_example_01.cpp @@ -268,10 +268,10 @@ class TridiagonalOperator : public Xpetra::Operator getDomainMap() const { return opMap_; } + const Teuchos::RCP getDomainMap() const { return opMap_; } //! Returns the Xpetra::Map object associated with the range of this operator. - Teuchos::RCP getRangeMap() const { return opMap_; } + const Teuchos::RCP getRangeMap() const { return opMap_; } //! Indicates whether this operator supports applying the adjoint operator. bool hasTransposeApply() const { return true; } @@ -405,10 +405,10 @@ class MFProlongatorOperator : public Xpetra::Operator getDomainMap() const { return domainMap_; } + const Teuchos::RCP getDomainMap() const { return domainMap_; } //! Returns the Xpetra::Map object associated with the range of this operator. - Teuchos::RCP getRangeMap() const { return rangeMap_; } + const Teuchos::RCP getRangeMap() const { return rangeMap_; } //! Indicates whether this operator supports applying the adjoint operator. bool hasTransposeApply() const { return true; }