Skip to content

Commit

Permalink
Merge branch 'hotfix-0.57.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcdougall committed Jun 23, 2017
2 parents 74068df + c67cad5 commit 488a38c
Show file tree
Hide file tree
Showing 29 changed files with 272 additions and 254 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ QUESO: Quantification of Uncertainty for Estimation,
Simulation, and Optimization.
-----------------------------------------------------

Version 0.57.1 (Jun 23, 2017)
* Fix bug in GPMSA getpot parse
* GCC 4.4 compatibility fixes
* Fix boost macro bug in build system

Version 0.57.0 (Apr 22, 2017)
* Add methods to calculate normalized GP parameters
* GCC-4.4.7 compatibility fixes
Expand Down
13 changes: 8 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.65)
AC_INIT([queso], [0.57.0], [[email protected]])
AC_INIT([queso], [0.57.1], [[email protected]])
PACKAGE_DESCRIPTION="The parallel C++ statistical library QUESO: Quantification of uncertainty for estimation, simulation and optimization"
AC_SUBST([PACKAGE_DESCRIPTION])
PACKAGE_URL="https://github.com/libqueso/queso"
Expand Down Expand Up @@ -97,8 +97,12 @@ AC_ARG_ENABLE([boost-program-options],
AS_HELP_STRING([--disable-boost-program-options], [Disables use
of boost program options for parsing the QUESO
input file. GetPot will be used instead.]),
[enable_program_options="no"],
[enable_program_options="yes"])
[case "${enableval}" in
yes) enable_program_options=yes ;;
no) enable_program_options=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-boost-program-options) ;;
esac],
[enable_program_options=yes])

#-------------------
# Compilers and MPI
Expand Down Expand Up @@ -195,8 +199,7 @@ AS_IF([test "x$enable_program_options" != "xno"],

AS_IF([test "x$enable_program_options" = "xno"],
[
QUESO_CPPFLAGS="$QUESO_CPPFLAGS -DDISABLE_BOOST_PROGRAM_OPTIONS"
AC_SUBST(QUESO_CPPFLAGS)
AC_DEFINE(DISABLE_BOOST_PROGRAM_OPTIONS, 1, [Flag determining whether boost program options is disabled])
])

BOOST_FIND_HEADER([boost/scoped_ptr.hpp])
Expand Down
2 changes: 1 addition & 1 deletion src/basic/inc/ScalarFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class BaseScalarFunction {
const VectorSet<V, M> & m_domainSet;

private:
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//! Input parser
ScopedPtr<BoostInputOptionsParser>::Type m_parser;
#endif
Expand Down
7 changes: 4 additions & 3 deletions src/basic/src/ScalarFunction.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
//
//-----------------------------------------------------------------------el-

#include <queso/config_queso.h>
#include <queso/ScalarFunction.h>
#include <queso/VectorSet.h>
#include <queso/VectorSpace.h>
#include <queso/GslVector.h>
#include <queso/GslMatrix.h>

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#include <queso/BoostInputOptionsParser.h>
#else
#include <queso/getpot.h>
Expand All @@ -47,15 +48,15 @@ BaseScalarFunction<V, M>::BaseScalarFunction(const char * prefix,
: m_env(domainSet.env()),
m_prefix((std::string)(prefix) + "func_"),
m_domainSet(domainSet),
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_parser(new BoostInputOptionsParser(m_env.optionsInputFileName())),
#endif
m_fdStepSize(1, std::atof(QUESO_BASESCALARFN_FD_STEPSIZE_ODV))
{
unsigned int dim = m_domainSet.vectorSpace().dimLocal();

// Snarf fd step size from input file.
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_parser->registerOption<std::string>(m_prefix + "fdStepSize",
QUESO_BASESCALARFN_FD_STEPSIZE_ODV,
"step size for finite difference");
Expand Down
4 changes: 2 additions & 2 deletions src/basic/src/SequenceStatisticalOptions.C
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#include <queso/Defines.h>
#ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#include <boost/program_options.hpp>
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

#include <queso/SequenceStatisticalOptions.h>
#include <queso/Miscellaneous.h>
Expand Down
5 changes: 3 additions & 2 deletions src/core/inc/BoostInputOptionsParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// Boston, MA 02110-1301 USA
//
//-----------------------------------------------------------------------el-
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#include <queso/config_queso.h>
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

#ifndef UQ_BOOST_INPUT_OPTIONS_H
#define UQ_BOOST_INPUT_OPTIONS_H
Expand Down Expand Up @@ -106,4 +107,4 @@ class BoostInputOptionsParser : public BaseInputOptionsParser

#endif // UQ_BOOST_INPUT_OPTIONS_H

#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
20 changes: 10 additions & 10 deletions src/core/inc/Environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
#include <fstream>


#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
// Forward declarations
namespace boost {
namespace program_options {
class options_description;
class variables_map;
}
}
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

namespace QUESO {

Expand Down Expand Up @@ -340,25 +340,25 @@ class BaseEnvironment {
void setOptionsInputFileAccessState(bool newState) const; // Yes, 'const'


#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#ifdef UQ_USES_COMMAND_LINE_OPTIONS
const boost::program_options::options_description& allOptionsDesc () const;
#endif
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//! Access function to private attribute m_allOptionsMap. It is an instance of boost::program_options::variables_map(), which
//! allows concrete variables to map which store variables in real map.
boost::program_options::variables_map& allOptionsMap () const;
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS


#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//! This method scans the input file provided by the user to QUESO.
/*! It checks if no input file is passed and updates the private attribute m_allOptionsDesc, which
* keeps all the options.*/
void scanInputFileForMyOptions(const boost::program_options::options_description& optionsDesc) const;
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

//! Access function to private attribute m_displayVerbosity. It manages how much information will be
//! release during the use of the QUESO library.
Expand Down Expand Up @@ -446,10 +446,10 @@ class BaseEnvironment {

std::string m_optionsInputFileName;
mutable bool m_optionsInputFileAccessState; // Yes, 'mutable'
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
ScopedPtr<boost::program_options::options_description>::Type m_allOptionsDesc;
ScopedPtr<boost::program_options::variables_map>::Type m_allOptionsMap;
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
ScopedPtr<GetPot>::Type m_input;

unsigned int m_subId;
Expand Down
21 changes: 11 additions & 10 deletions src/core/inc/EnvironmentOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
#include <set>
#include <vector>

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#include <queso/config_queso.h>
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#include <queso/BoostInputOptionsParser.h>
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

#include <queso/ScopedPtr.h>

Expand All @@ -55,14 +56,14 @@
#define UQ_ENV_NUM_DEBUG_PARAMS_ODV 0
#define UQ_ENV_DEBUG_PARAM_ODV 0.

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
// Forward declarations
namespace boost {
namespace program_options {
class options_description;
}
}
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

namespace QUESO {

Expand Down Expand Up @@ -172,9 +173,9 @@ class EnvOptionsValues
private:
const BaseEnvironment * m_env;

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
ScopedPtr<BoostInputOptionsParser>::Type m_parser;
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

//! Input file option name for flagging helpful printing output
std::string m_option_help;
Expand Down Expand Up @@ -262,13 +263,13 @@ class EnvironmentOptions
EnvOptionsValues m_ov;

private:
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//! Define my environment options as the default options
void defineMyOptions (boost::program_options::options_description& optionsDesc) const;

//! Gets the option values of the environment.
void getMyOptionValues(boost::program_options::options_description& optionsDesc);
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

//! Environment.
const BaseEnvironment& m_env;
Expand All @@ -280,9 +281,9 @@ class EnvironmentOptions
/*! Uses boost::program_options::options_description. A set of option descriptions.
* This provides convenient interface for adding new option method, and facilities
* to search for options by name.*/
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
ScopedPtr<boost::program_options::options_description>::Type m_optionsDesc;
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

std::string m_option_help;

Expand Down
8 changes: 4 additions & 4 deletions src/core/inc/InfiniteDimensionalMCMCSamplerOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

#include <queso/Environment.h>

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#include <queso/BoostInputOptionsParser.h>
#else
#include <queso/getpot.h>
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

namespace QUESO {

Expand Down Expand Up @@ -83,9 +83,9 @@ class InfiniteDimensionalMCMCSamplerOptions
const BaseEnvironment& env() const;

private:
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
BoostInputOptionsParser * m_parser;
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

const BaseEnvironment& m_env;

Expand Down
5 changes: 3 additions & 2 deletions src/core/src/BoostInputOptionsParser.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
//
//-----------------------------------------------------------------------el-

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#include <queso/config_queso.h>
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#include <boost/program_options.hpp>

#include <queso/BoostInputOptionsParser.h>
Expand Down Expand Up @@ -176,4 +177,4 @@ template void BoostInputOptionsParser::getOption<std::vector<unsigned int, std::
template void BoostInputOptionsParser::getOption<std::vector<double, std::allocator<double> > >(const std::string&, std::vector<double, std::allocator<double> >&) const;

} // End namespace QUESO
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
32 changes: 16 additions & 16 deletions src/core/src/Environment.C
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <queso/Environment.h>

#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#include <boost/program_options.hpp>
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

#include <queso/getpot.h>

Expand Down Expand Up @@ -153,10 +153,10 @@ BaseEnvironment::BaseEnvironment(
m_fullCommSize (1),
m_optionsInputFileName (""),
m_optionsInputFileAccessState(true),
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_allOptionsDesc (),
m_allOptionsMap (),
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_input (new GetPot),
m_subComm (),
m_subRank (-1),
Expand Down Expand Up @@ -192,10 +192,10 @@ BaseEnvironment::BaseEnvironment(
m_fullCommSize (1),
m_optionsInputFileName (passedOptionsInputFileName),
m_optionsInputFileAccessState(true),
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_allOptionsDesc (),
m_allOptionsMap (),
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_input (new GetPot),
m_subComm (),
m_subRank (-1),
Expand Down Expand Up @@ -369,7 +369,7 @@ BaseEnvironment::setOptionsInputFileAccessState(bool newState) const
return;
}
//-------------------------------------------------------
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
#ifdef UQ_USES_COMMAND_LINE_OPTIONS
const boost::program_options::options_description&
BaseEnvironment::allOptionsDesc() const
Expand All @@ -379,9 +379,9 @@ BaseEnvironment::allOptionsDesc() const
return *m_allOptionsDesc;
}
#endif
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//-------------------------------------------------------
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
boost::program_options::variables_map&
BaseEnvironment::allOptionsMap() const
{
Expand All @@ -390,9 +390,9 @@ BaseEnvironment::allOptionsMap() const
queso_require_msg(m_allOptionsMap, "m_allOptionsMap variable is NULL");
return *m_allOptionsMap;
}
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//-------------------------------------------------------
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
void
BaseEnvironment::scanInputFileForMyOptions(const boost::program_options::options_description& optionsDesc) const
{
Expand Down Expand Up @@ -444,7 +444,7 @@ BaseEnvironment::scanInputFileForMyOptions(const boost::program_options::options

return;
}
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
//-----------------------------------------------------
unsigned int
BaseEnvironment::displayVerbosity() const
Expand Down Expand Up @@ -1235,10 +1235,10 @@ FullEnvironment::construct (RawType_MPI_Comm inputComm,
// If there's an input file, we grab the options from there. Otherwise the
// defaults are used
if (m_optionsInputFileName != "") {
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_allOptionsMap.reset(new boost::program_options::variables_map());
m_allOptionsDesc.reset(new boost::program_options::options_description("Allowed options"));
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

readOptionsInputFile();

Expand Down Expand Up @@ -1516,10 +1516,10 @@ FullEnvironment::construct (const char *prefix)
// If there's an input file, we grab the options from there. Otherwise the
// defaults are used
if (m_optionsInputFileName != "") {
#ifndef DISABLE_BOOST_PROGRAM_OPTIONS
#ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
m_allOptionsMap.reset(new boost::program_options::variables_map());
m_allOptionsDesc.reset(new boost::program_options::options_description("Allowed options"));
#endif // DISABLE_BOOST_PROGRAM_OPTIONS
#endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS

readOptionsInputFile();

Expand Down
Loading

0 comments on commit 488a38c

Please sign in to comment.