Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trilinos: Deprecate four packages (second attempt) #4957

Merged
merged 9 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmake/std/PullRequestLinuxGCC7.2.0TestingSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set (Domi_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as error
set (EpetraExt_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
#set (FEI_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Galeri_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (GlobiPack_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (GlobiPack_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -DTRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS" CACHE STRING "Warnings as errors setting")
set (Gtest_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Ifpack_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Ifpack2_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
Expand All @@ -48,12 +48,12 @@ set (MiniTensor_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as
set (ML_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (MueLu_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (NOX_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (OptiPack_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (OptiPack_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -DTRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS" CACHE STRING "Warnings as errors setting")
#set (Pamgen_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Panzer_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Phalanx_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Pike_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Piro_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Piro_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -DTRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS" CACHE STRING "Warnings as errors setting")
#set (ROL_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (RTOp_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
set (Rythmos_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" CACHE STRING "Warnings as errors setting")
Expand Down
5 changes: 5 additions & 0 deletions packages/claps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ TRIBITS_ADD_OPTION_AND_DEFINE(${PACKAGE_NAME}_ENABLE_SClaps
"Enable Sandia Claps interface."
OFF )

# Claps package is deprecated April 2019; to be removed May 2019
MESSAGE(WARNING "***** WARNING: Package Claps is deprecated in April 2019; it will be removed in May 2019 *****")

TRIBITS_ADD_SHOW_DEPRECATED_WARNINGS_OPTION()

#
# C) Add the libraries, tests, and examples
#
Expand Down
2 changes: 2 additions & 0 deletions packages/claps/cmake/Claps_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H

@CLAPS_DEPRECATED_DECLARATIONS@

/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
Expand Down
6 changes: 6 additions & 0 deletions packages/claps/src/Claps_ConfigDefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
#ifndef EPETRA_CONFIGDEFS_H
#define EPETRA_CONFIGDEFS_H

#if !defined(TRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS)
#ifdef __GNUC__
# warning "The package Claps is deprecated in April 2019; it will be removed from Trilinos in May 2019."
#endif
#endif

#ifndef __cplusplus
#define __cplusplus
#endif
Expand Down
3 changes: 3 additions & 0 deletions packages/globipack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

TRIBITS_PACKAGE( GlobiPack ENABLE_SHADOWING_WARNINGS CLEANED )

# GlobiPack package is deprecated April 2019; to be removed May 2019
MESSAGE(WARNING "***** WARNING: Package GlobiPack is deprecated in April 2019; it will be removed in May 2019 *****")

TRIBITS_ADD_EXPLICIT_INSTANTIATION_OPTION()

ADD_SUBDIRECTORY(src)
Expand Down
7 changes: 6 additions & 1 deletion packages/globipack/cmake/GlobiPack_Config.h.in
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/* Nothing to add yet!. */
/* Deprecation notice */
#if !defined(TRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS)
#ifdef __GNUC__
# warning "The package GlobiPack is deprecated in April 2019; it will be removed from Trilinos in May 2019."
#endif
#endif
6 changes: 6 additions & 0 deletions packages/optipack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

TRIBITS_PACKAGE(OptiPack)


# OptiPack package is deprecated April 2019; to be removed May 2019
MESSAGE(WARNING "***** WARNING: Package OptiPack is deprecated in April 2019; it will be removed in May 2019 *****")

TRIBITS_ADD_SHOW_DEPRECATED_WARNINGS_OPTION()

TRIBITS_ADD_EXPLICIT_INSTANTIATION_OPTION()

ADD_SUBDIRECTORY(src)
Expand Down
9 changes: 8 additions & 1 deletion packages/optipack/cmake/OptiPack_Config.h.in
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/* Nothing to add yet!. */
/* Deprecation notice */
#if !defined(TRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS)
#ifdef __GNUC__
# warning "The package OptiPack is deprecated in April 2019; it will be removed from Trilinos in May 2019."
#endif
#endif

@OPTIPACK_DEPRECATED_DECLARATIONS@
4 changes: 4 additions & 0 deletions packages/piro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ IF (${PACKAGE_NAME}_ENABLE_Epetra AND NOT NOX_ENABLE_Epetra)
MESSAGE(FATAL_ERROR "Piro configuration error: Enabling Epetra in Piro also requires that Epetra be enabled in NOX (-DNOX_ENABLE_Epetra:BOOL=ON)")
ENDIF()

IF (${PACKAGE_NAME}_ENABLE_OptiPack)
MESSAGE(WARNING "***** WARNING: OptiPack is deprecated in April 2019; it will be removed in May 2019 ***** ")
MESSAGE(WARNING "***** WARNING: Option Piro_ENABLE_OptiPack is deprecated in April 2019; it will be removed in May 2019 ***** ")
ENDIF()

#
# C) Add the libraries, tests, and examples
Expand Down
2 changes: 2 additions & 0 deletions packages/piro/cmake/Piro_config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
#cmakedefine HAVE_PIRO_STOKHOS
/* DEPRECATED */
#cmakedefine Piro_ENABLE_Stokhos
#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
#cmakedefine HAVE_PIRO_OPTIPACK
/* DEPRECATED */
#cmakedefine Piro_ENABLE_OptiPack
#endif // !OPTIPACK_HIDE_DEPRECATED_CODE
#cmakedefine HAVE_PIRO_TRIKOTA
/* DEPRECATED */
#cmakedefine Piro_ENABLE_TriKota
Expand Down
26 changes: 24 additions & 2 deletions packages/piro/src/Piro_PerformAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@
#include "MoochoPack_MoochoThyraSolver.hpp"
#endif

#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
#ifdef HAVE_PIRO_OPTIPACK
#include "OptiPack_NonlinearCG.hpp"
#include "GlobiPack_BrentsLineSearch.hpp"
#endif
#endif

#ifdef HAVE_PIRO_ROL
#include "ROL_ThyraVector.hpp"
Expand Down Expand Up @@ -118,6 +120,8 @@ Piro::PerformAnalysis(

}
#endif

#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
#ifdef HAVE_PIRO_OPTIPACK
else if (analysis == "OptiPack") {
*out << "Piro PerformAnalysis: Optipack Optimization Being Performed " << endl;
Expand All @@ -127,6 +131,8 @@ Piro::PerformAnalysis(

}
#endif
#endif

#ifdef HAVE_PIRO_ROL
else if (analysis == "ROL") {
*out << "Piro PerformAnalysis: ROL Optimization Being Performed " << endl;
Expand All @@ -136,12 +142,20 @@ Piro::PerformAnalysis(
}
#endif
else {
if (analysis == "Dakota" || analysis == "OptiPack" || analysis == "MOOCHO" || analysis == "ROL")
if (analysis == "Dakota" ||
#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
analysis == "OptiPack" ||
#endif
analysis == "MOOCHO" || analysis == "ROL")
*out << "ERROR: Trilinos/Piro was not configured to include \n "
<< " analysis type: " << analysis << endl;
else
*out << "ERROR: Piro: Unknown analysis type: " << analysis << "\n"
<< " Valid analysis types are: Solve, Dakota, MOOCHO, OptiPack, ROL\n" << endl;
<< " Valid analysis types are: Solve, Dakota, MOOCHO, "
#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
<< "OptiPack, "
#endif
<< "ROL\n" << endl;
status = 0; // Should not fail tests
}

Expand Down Expand Up @@ -249,7 +263,12 @@ Piro::PerformDakotaAnalysis(
#endif
}

#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
int
#ifdef HAVE_PIRO_OPTIPACK
// Spew deprecation warnings only if Piro user has requested OptiPack.
OPTIPACK_DEPRECATED
#endif
Piro::PerformOptiPackAnalysis(
Thyra::ModelEvaluatorDefaultBase<double>& piroModel,
Teuchos::ParameterList& optipackParams,
Expand Down Expand Up @@ -304,6 +323,7 @@ Piro::PerformOptiPackAnalysis(
return 0; // should not fail tests
#endif
}
#endif // !OPTIPACK_HIDE_DEPRECATED_CODE

int
Piro::PerformROLAnalysis(
Expand Down Expand Up @@ -498,8 +518,10 @@ Piro::getValidPiroAnalysisParameters()
validPL->set<bool>("Output Final Parameters", false, "");
validPL->sublist("Solve", false, "");
validPL->sublist("MOOCHO", false, "");
#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
validPL->sublist("OptiPack", false, "");
validPL->sublist("GlobiPack", false, "");
#endif
validPL->sublist("Dakota", false, "");
validPL->sublist("ROL", false, "");
validPL->set<int>("Write Interval", 1, "Iterval between writes to mesh");
Expand Down
15 changes: 14 additions & 1 deletion packages/piro/src/Piro_PerformAnalysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
#include "Thyra_ModelEvaluatorDefaultBase.hpp"
#include "Thyra_VectorStdOps.hpp"

#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
#ifdef HAVE_PIRO_OPTIPACK
#include "OptiPack_Config.h"
#endif
#endif

namespace Piro {

//! \name Top-level Thyra analysis driver
Expand Down Expand Up @@ -85,15 +91,22 @@ namespace Piro {
Teuchos::RCP< Thyra::VectorBase<double> >& p
);

#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
//! \brief Performs analysis of a solved model using Optipack.
//! \details Requires that the OptiPack package is available.
//! \ingroup Piro_Thyra_analysis_driver_grp
int PerformOptiPackAnalysis(
int
#ifdef HAVE_PIRO_OPTIPACK
// Spew deprecation warnings only if Piro user has requested OptiPack.
OPTIPACK_DEPRECATED
#endif
PerformOptiPackAnalysis(
Thyra::ModelEvaluatorDefaultBase<double>& piroModel,
Teuchos::ParameterList& optipackParams,
Teuchos::ParameterList& globipackParams,
Teuchos::RCP< Thyra::VectorBase<double> >& p
);
#endif

//! \brief Performs analysis of a solved model using ROL.
//! \details Requires that the ROL package is available.
Expand Down
4 changes: 4 additions & 0 deletions packages/piro/test/Main_AnalysisDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ int main(int argc, char *argv[]) {
case 0: inputFile="input_Analysis_Dakota.xml"; break;
case 1: inputFile="input_Analysis_ROL.xml"; break;
case 2: inputFile="input_Analysis_ROL_AdjointSensitivities.xml"; break;
#ifndef OPTIPACK_HIDE_DEPRECATED_CODE
case 3: inputFile="input_Analysis_OptiPack.xml"; break;
#else
case 3: continue;
#endif
case 4: inputFile="input_Analysis_MOOCHO.xml"; break;
default : std::cout << "iTest logic error " << std::endl; exit(-1);
}
Expand Down
3 changes: 3 additions & 0 deletions packages/trios/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@

TRIBITS_PACKAGE_DECL( Trios ENABLE_SHADOWING_WARNINGS )

# Trios package is deprecated April 2019; to be removed May 2019
MESSAGE(WARNING "***** WARNING: Package Trios is deprecated in April 2019; it will be removed in May 2019 *****")

TRIBITS_ADD_DEBUG_OPTION()

TRIBITS_ADD_SHOW_DEPRECATED_WARNINGS_OPTION()
Expand Down
7 changes: 7 additions & 0 deletions packages/trios/cmake/Trios_config.h.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

/* Deprecation notice */
#if !defined(TRILINOS_HIDE_DEPRECATED_HEADER_WARNINGS)
#ifdef __GNUC__
# warning "The package Trios is deprecated in April 2019; it will be removed from Trilinos in May 2019."
#endif
#endif

/* ************************************************
* Network configuration
* ************************************************ */
Expand Down