Skip to content

Commit

Permalink
Merge branch 'v0.54.0-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcdougall committed Oct 8, 2015
2 parents c2b59d4 + 3ea0459 commit 547efb1
Show file tree
Hide file tree
Showing 145 changed files with 2,199 additions and 372 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ examples/fullCovarianceRandomCoefficient
examples/blockDiagonalCovarianceRandomCoefficients
examples/4d_interp
examples/4d_interp_read
examples/example_SharedPtr

src/core/inc/queso.h
src/libqueso.la
Expand Down Expand Up @@ -206,3 +207,10 @@ test/test_InterpolationSurrogateHelper
test/test_build_InterpolationSurrogateBuilder
test/test_write_InterpolationSurrogateBuilder_1.dat
test/test_write_InterpolationSurrogateBuilder_2.dat
test/output_test_optimizer_options
test/test_optimizer/input_test_optimizer_options
test/test_optimizer_options
test/test_SharedPtr
test/output_test_serialEnv
test/test_Environment/input_test_serialEnv
test/test_serialEnv
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ before_script:
- sudo apt-get install -q build-essential
- sudo apt-get install -q libgsl0-dev
- sudo apt-get install -q openmpi-bin openmpi-dev
- sudo apt-get install -q libboost-all-dev
script: ./bootstrap && CC="mpicc" CXX="mpicxx" ./configure && make -j2 && make check
- sudo apt-get install -q libboost-dev libboost-math-dev libboost-program-options-dev
script:
- ./bootstrap
- ./configure CC="mpicc" CXX="mpicxx"
- make -j4
- make check -j4
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ QUESO: Quantification of Uncertainty for Estimation,
Simulation, and Optimization.
-----------------------------------------------------

Version 0.54.0
* Fix memory leak in test_GslVector
* Make MPI optional
* Optimise GSLMatrix::operator() and GslVector::operator[]
* Add 'txt' file output option
* Add SharedPtr
* Add input file options for optimisation and monitoring
* Fix some compiler warnings
* Fix HDF5 #include issues

Version 0.53.0
* Add linear interpolation surrogates
* Refactor input options processing
Expand Down
31 changes: 27 additions & 4 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.53.1], [queso-users@googlegroups.com])
AC_INIT([queso], [0.54.0], [queso-users@googlegroups.com])
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 @@ -75,17 +75,37 @@ else
AC_MSG_RESULT(no)
fi

#############################################
# Check if the user explicitly disabled mpi #
#############################################
AC_ARG_ENABLE(mpi,
AS_HELP_STRING([--disable-mpi],
[build without message passing support]),
[enable_mpi=no],
[enable_mpi=yes])

#-------------------
# Compilers and MPI
#-------------------

AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
AC_LANG([C])
ACX_MPI([CC="$MPICC"], [AC_MSG_ERROR([Could not find MPI.])])

HAVE_MPI=0
if test "x$enable_mpi" = "xyes"; then
ACX_MPI(CC="$MPICC", [AC_MSG_ERROR([Could not find MPI.])])
HAVE_MPI=1
fi

AC_LANG([C++])
ACX_MPI([CXX="$MPICXX"], [AC_MSG_ERROR([Could not find MPI.])])

if test "x$enable_mpi" = "xyes"; then
ACX_MPI(CXX="$MPICXX", [AC_MSG_ERROR([Could not find MPI.])])
HAVE_MPI=1
fi
AC_SUBST(HAVE_MPI)
AM_CONDITIONAL(MPI_ENABLED, test x$HAVE_MPI = x1)

#-------------------------
# External Library Checks
Expand Down Expand Up @@ -124,6 +144,7 @@ AC_LANG([C++])
BOOST_REQUIRE([1.35])
BOOST_PROGRAM_OPTIONS
BOOST_FIND_HEADER([boost/scoped_ptr.hpp])
BOOST_FIND_HEADER([boost/shared_ptr.hpp])
AC_CACHE_SAVE

# Check for GLPK (optional)
Expand Down Expand Up @@ -218,6 +239,8 @@ AC_CONFIG_FILES([
test/test_InputOptionsParser/test_options_good.txt
test/test_InputOptionsParser/test_options_bad.txt
test/test_InputOptionsParser/test_options_default.txt
test/test_optimizer/input_test_optimizer_options
test/test_Environment/input_test_serialEnv
])

AC_CONFIG_FILES([test/test_Regression/test_cobra_samples_diff.sh
Expand Down
14 changes: 14 additions & 0 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,20 @@ dist_interpsurrg_DATA += ${4d_interp_read_SOURCES}
dist_interpsurrg_DATA += interpolation_surrogate/input.in
dist_interpsurrg_DATA += interpolation_surrogate/4d_interp_data_coarse.dat

#####################
# SharedPtr example #
#####################
pointersdir = $(prefix)/examples/pointers

pointers_PROGRAMS = example_SharedPtr

example_SharedPtr_SOURCES = pointers/example_SharedPtr.C
example_SharedPtr_LDADD = $(top_builddir)/src/libqueso.la
example_SharedPtr_CPPFLAGS = $(QUESO_CPPFLAGS)

dist_pointers_DATA =
dist_pointers_DATA += ${example_SharedPtr_SOURCES}

if CODE_COVERAGE_ENABLED
CLEANFILES = *.gcda *.gcno
endif
Expand Down
2 changes: 1 addition & 1 deletion examples/bimodal/src/bimodal_likelihood.C
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ double likelihoodRoutine(

if (paramValues.env().exceptionalCircumstance()) {
if ((paramValues.env().subDisplayFile() ) &&
(paramValues.env().displayVerbosity() >= 0)) { // detailed output debug
(paramValues.env().displayVerbosity() > 0)) { // detailed output debug
*paramValues.env().subDisplayFile() << "Leaving likelihood function"
<< ": paramValues = " << paramValues
<< ", returnValue = " << returnValue
Expand Down
6 changes: 6 additions & 0 deletions examples/bimodal/src/bimodal_main.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@
int main(int argc, char* argv[])
{
// Initialize environment
#ifdef QUESO_HAS_MPI
MPI_Init(&argc,&argv);
QUESO::FullEnvironment* env = new QUESO::FullEnvironment(MPI_COMM_WORLD,argv[1],"",NULL);
#else
QUESO::FullEnvironment* env = new QUESO::FullEnvironment(argv[1],"",NULL);
#endif

// Compute
compute(*env);

// Finalize environment
delete env;
#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif
return 0;
}
7 changes: 6 additions & 1 deletion examples/gaussian_likelihoods/blockDiagonalCovariance.C
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ public:
};

int main(int argc, char ** argv) {
#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
"param_", 1, NULL);
Expand Down Expand Up @@ -121,7 +124,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ public:
};

int main(int argc, char ** argv) {
#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

// Need 3 dims because two are for the hyperparameters
QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
Expand Down Expand Up @@ -127,7 +130,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
7 changes: 6 additions & 1 deletion examples/gaussian_likelihoods/diagonalCovariance.C
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ public:
};

int main(int argc, char ** argv) {
#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
"param_", 1, NULL);
Expand Down Expand Up @@ -116,7 +119,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
Expand Down
7 changes: 6 additions & 1 deletion examples/gaussian_likelihoods/fullCovariance.C
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ public:
};

int main(int argc, char ** argv) {
#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
"param_", 1, NULL);
Expand Down Expand Up @@ -118,7 +121,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
10 changes: 6 additions & 4 deletions examples/gaussian_likelihoods/fullCovarianceRandomCoefficient.C
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ public:
};

int main(int argc, char ** argv) {
#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
"param_", 2, NULL);

double min_val = 0.0;
double max_val = 1.0;

QUESO::GslVector paramMins(paramSpace.zeroVector());
QUESO::GslVector paramMaxs(paramSpace.zeroVector());

Expand Down Expand Up @@ -131,7 +131,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
7 changes: 6 additions & 1 deletion examples/gaussian_likelihoods/scalarCovariance.C
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ public:
};

int main(int argc, char ** argv) {
#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
"param_", 1, NULL);
Expand Down Expand Up @@ -111,7 +114,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
Expand Down
6 changes: 6 additions & 0 deletions examples/gp/scalar/gpmsa_scalar.C
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ int main(int argc, char ** argv) {
unsigned int numEta = 1; // Number of responses the model is returning
unsigned int experimentSize = 1; // Size of each experiment

#ifdef QUESO_HAS_MPI
MPI_Init(&argc, &argv);

// Step 1: Set up QUESO environment
QUESO::FullEnvironment env(MPI_COMM_WORLD, argv[1], "", NULL);
#else
QUESO::FullEnvironment env(argv[1], "", NULL);
#endif

// Step 2: Set up prior for calibration parameters
QUESO::VectorSpace<QUESO::GslVector, QUESO::GslMatrix> paramSpace(env,
Expand Down Expand Up @@ -283,7 +287,9 @@ int main(int argc, char ** argv) {

ip.solveWithBayesMetropolisHastings(NULL, paramInitials, &proposalCovMatrix);

#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
7 changes: 7 additions & 0 deletions examples/gravity/src/gravity_main.C
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,23 @@
int main(int argc, char* argv[])
{
// Initialize QUESO environment
#ifdef QUESO_HAS_MPI
MPI_Init(&argc,&argv);
QUESO::FullEnvironment* env =
new QUESO::FullEnvironment(MPI_COMM_WORLD,argv[1],"",NULL);
#else
QUESO::FullEnvironment* env =
new QUESO::FullEnvironment(argv[1],"",NULL);
#endif

// Call application
computeGravityAndTraveledDistance(*env);

// Finalize QUESO environment
delete env;
#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
7 changes: 7 additions & 0 deletions examples/hysteretic/src/example_main.C
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@
int main(int argc, char* argv[])
{
// Initialize environment
#ifdef QUESO_HAS_MPI
MPI_Init(&argc,&argv);
QUESO::FullEnvironment* env =
new QUESO::FullEnvironment(MPI_COMM_WORLD,argv[1],"",NULL);
#else
QUESO::FullEnvironment* env =
new QUESO::FullEnvironment(argv[1],"",NULL);
#endif

// Compute
#if 1
Expand All @@ -48,7 +53,9 @@ int main(int argc, char* argv[])

// Finalize environment
delete env;
#ifdef QUESO_HAS_MPI
MPI_Finalize();
#endif

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <libmesh/mesh.h>
#include <libmesh/mesh_generation.h>
#include <queso/Environment.h>
#include <queso/EnvironmentOptions.h>
#include <queso/FunctionOperatorBuilder.h>
#include <queso/LibMeshFunction.h>
#include <queso/LibMeshNegativeLaplacianOperator.h>
Expand Down
Loading

0 comments on commit 547efb1

Please sign in to comment.