Skip to content

Release 2.1 #100

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

Merged
merged 90 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
37ab577
Reworking spack setup
whart222 Jun 4, 2024
5b22416
Merge pull request #91 from sandialabs/dev-weh
whart222 Jun 4, 2024
0904b7c
Expanding build options
whart222 Jun 7, 2024
c6a5bec
Disabling CPPAD by default
whart222 Jun 7, 2024
25ca1b4
Several changes
whart222 Jun 11, 2024
3d24041
Merge branch 'dev-weh' of github.com:sandialabs/coek into dev-weh
whart222 Jun 11, 2024
ff66997
Pulling more data from coek results
whart222 Jun 11, 2024
bdb115c
Removing verbosity
whart222 Jun 11, 2024
db064fc
Updating logic for finding gurobi
whart222 Jun 19, 2024
da3e4b8
Several changes to build script
whart222 Jun 19, 2024
f641b4e
Merge branch 'dev' into dev-weh
whart222 Jun 20, 2024
cc44423
Merge pull request #92 from sandialabs/dev-weh
whart222 Jun 20, 2024
f1dbf5e
Misc edits to resolve bugs in pycoek usage
whart222 Jul 11, 2024
15dd2fe
Enabling comparisons with coek as baseline
whart222 Aug 4, 2024
98dcb66
Refactoring to support compact test spec
whart222 Aug 4, 2024
14706ae
Adding a top-level benchmarking script
whart222 Aug 4, 2024
084063b
Two changes
whart222 Aug 4, 2024
64e1fde
Several changes
whart222 Aug 4, 2024
58ff54d
Adding pybind11 with python
whart222 Aug 4, 2024
9af8fd2
Removing unnecessary check for negative values
whart222 Aug 4, 2024
65fe25e
Fixing version of fmtlib
whart222 Aug 5, 2024
d763c57
Merge pull request #93 from sandialabs/dev-weh
whart222 Aug 5, 2024
c034fee
Adding contains() method
whart222 Sep 3, 2024
cb4b66c
Adding a contains() method
whart222 Sep 5, 2024
a4a8899
Adding intrisic functions that take a double
whart222 Sep 5, 2024
f8519e8
Adding expr() methods
whart222 Sep 5, 2024
9cba97f
Initialize a ParameterMap with a std::map
whart222 Sep 5, 2024
38abdbf
Allow specification of constraint with expr() method
whart222 Sep 5, 2024
a5066fc
Adding explicit typenames for intrinsic functions
whart222 Sep 5, 2024
75afd38
Add externals to spack
whart222 Sep 13, 2024
751faae
Adding debugging output
whart222 Sep 13, 2024
ef655e7
Enable redirection of print_equations()
whart222 Sep 22, 2024
1b9c32c
Enable string redirection for model I/O
whart222 Sep 22, 2024
982814a
A major change to Coek internals
whart222 Sep 30, 2024
8a34c2e
Removing debugging output
whart222 Sep 30, 2024
f08f88d
Bug fix loading double parameter value
whart222 Sep 30, 2024
fcaa957
Refactoring assoc_array logic
whart222 Sep 30, 2024
3d0e099
Installing a new header
whart222 Sep 30, 2024
b80cae1
Reformatting with clang-format
whart222 Oct 1, 2024
d572a83
Trying to make the testing scripts more robust
whart222 Oct 1, 2024
7883e15
Several changes
whart222 Oct 2, 2024
702b6cf
Extending API for intrinsic functions
whart222 Oct 2, 2024
f2275e3
Finding externals before creating an environment
whart222 Oct 2, 2024
bba0e78
Adding add_parameter logic
whart222 Oct 4, 2024
67fe666
Various changes
whart222 Oct 4, 2024
afcf4c0
Reformatting
whart222 Oct 4, 2024
a2bc5e2
Fixing test after reworking caching logic
whart222 Oct 4, 2024
2e7426c
Adding data() logic
whart222 Oct 5, 2024
559e4d1
Several changes
whart222 Oct 6, 2024
4ec85c3
Adding data() logic to pycoek and poek
whart222 Oct 6, 2024
1df7da2
Fixing spack env logic
whart222 Oct 6, 2024
bd2fcee
Extending parameter/data map APIs
whart222 Oct 6, 2024
a464488
Ensuring that names are generated to print equations
whart222 Oct 6, 2024
e4bf398
Reformatting
whart222 Oct 6, 2024
4ed2c2c
Reworking map logic to use IndexSequence objects
whart222 Oct 7, 2024
411b3ac
Reformatting
whart222 Oct 7, 2024
c4aa19b
Several changes
whart222 Oct 7, 2024
b0b9760
Several changes
whart222 Oct 8, 2024
b16bb8e
Bug fix
whart222 Oct 8, 2024
711f5af
Checking if compact models are defined
whart222 Oct 8, 2024
c7d5803
Several changes
whart222 Oct 9, 2024
48dbd95
Several changes
whart222 Oct 9, 2024
22edeec
Bug fixes
whart222 Oct 9, 2024
b0cf288
Various changes
whart222 Oct 10, 2024
8e08b31
Merge pull request #96 from sandialabs/dev-weh
whart222 Oct 11, 2024
35ee98b
Merge branch 'dev' into dev-public
whart222 Oct 11, 2024
e2c3e93
Misc edit
whart222 Dec 13, 2024
1e06aca
Misc edit
whart222 Feb 12, 2025
c2a58fc
Two changes
whart222 Feb 12, 2025
219cec9
Merge pull request #97 from sandialabs/dev-weh
whart222 Feb 12, 2025
3be2a14
Merge branch 'dev' of github.com:sandialabs/coek into dev-public
whart222 Feb 13, 2025
cba24a8
Enabling more CTest output on failure
whart222 Feb 13, 2025
45709fc
Misc edit
whart222 Feb 13, 2025
b764692
Catch unexpected exceptions during test
whart222 Feb 14, 2025
96d5d87
Adding more logic to catch exceptions
whart222 Feb 14, 2025
e28ff5e
Several changes
whart222 Feb 14, 2025
fdb5da1
Merge pull request #98 from sandialabs/dev-weh
whart222 Feb 14, 2025
817514a
Merge remote-tracking branch 'gh/dev' into dev-public
whart222 Feb 14, 2025
1893926
Renaming section
whart222 Feb 14, 2025
86b8ad8
Renaming test for gurobi license
whart222 Feb 14, 2025
6e519a8
Printing termination condition
whart222 Feb 14, 2025
7e20f77
Several changes
whart222 Feb 14, 2025
e12f662
Capturing error message with licensing problem
whart222 Feb 14, 2025
e16076a
Merge pull request #99 from sandialabs/dev-weh
whart222 Feb 14, 2025
e9bc3bc
Merge remote-tracking branch 'gh/dev' into dev-public
whart222 Feb 14, 2025
241e488
Several changes
whart222 Feb 15, 2025
4a6cf5f
Treating license issues as warnings
whart222 Feb 15, 2025
150b68b
More error messages
whart222 Feb 15, 2025
0ac5fd4
Changing test semantics to warning
whart222 Feb 15, 2025
63eb343
Changelog updates for 2.1 release
whart222 Feb 15, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v3
- name: build tpls with Spack and then Coek
run: |
./build.sh
./build.sh --with-spack
- name: test
run: |
cd _build
Expand Down
20 changes: 20 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ Here we list changes of Coek. More detailed information
about incremental changes can be found in the [commit
history](https://github.com/sandialabs/coek/commits).

## 2.1

* Reworked Spack to use the or-fusion-spack-repo to define TPLs
* coek: Expanded list of domain names used to specify domain and bounds values
* coek: Updates to gurobi configuration and environment setup logic
* coek: Removed void* references and used shared pointer references instead
* coek: Reverted IndexVector to std::vector to resolve memory management issues
* coek: Refactored assoc_array logic to avoid cross-links within coek
* coek: Added Data logic, which represents immutable model data that is used in compact expressions
* coek: Added IndexSequence, which iterates over the IndexParameters associated with a ConcreteSet. This provides a more generic iterator concept than ExpressionSequence.
* coek: Reworking map logic to use IndexSequence objects.
* coek: Fixes to compact expression walkers.
* coek: Enabled expand() logic for Parameter's
* coek: Fixed bugs with compact LP writer
* pycoek: Enable setup of data/param/var data with SequenceContext objects
* pycoek: Expose DataPortal
* tests: More robust testing scripts
* tests: Enable comparisons with coek as a baseline
* tests: Treating Gurobi license issues as warnings

## 2.0

* Adding support for builds with Spack
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Github Actions Status](https://github.com/sandialabs/coek/workflows/Linux%20Build%20and%20Tests/badge.svg?event=push)](https://github.com/sandialabs/coek/actions?query=workflow%3A%22Linux+Build+and+Tests%22++)

# The Coek Project
# The Coek Project

## Overview

Expand Down
178 changes: 124 additions & 54 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,48 @@
#
# This uses Spack to install third-party dependencies in the `_spack` directory.
#
with_python="OFF"
python_exe=""
spack_reinstall=0
spack_dev=0
clang=0
compact="OFF"
debug="OFF"
python_exe=""
scip_config="OFF"
spack_dev=0
spack_env="coekenv"
spack_home=`pwd`/_spack
spack_reinstall=0

with_asl="ON"
with_catch="ON"
with_fmtlib="ON"
with_highs="ON"
with_python="OFF"
with_rapidjson="ON"
with_scip=""
with_spack=0
with_valgrind=""
while [[ $# -gt 0 ]]; do
case $1 in
--help)
echo "build.sh [--help] [--clang] [--debug] [--python] [--python-exe <file>] [--spack-dev] [--spack-home <dir>] [--spack-reinstall] [--valgrind]"
echo "build.sh [--help] [--clang] [--compact] [--debug] [--python] [--python-exe <file>] [--scip] [--spack-dev] [--spack-env <env>] [--spack-home <dir>] [--spack-reinstall] [--valgrind] [--with-spack]"
exit
;;
--clang)
clang=1
shift
;;
--compact)
compact="ON"
shift
;;
--debug)
debug="ON"
shift
;;
--spack-env)
spack_env="$2"
shift
shift
;;
--python)
with_python="ON"
shift
Expand All @@ -35,6 +55,11 @@ while [[ $# -gt 0 ]]; do
python_exe="-DPython_EXECUTABLE=$2"
shift
;;
--scip)
with_scip="scip"
scip_config="ON"
shift
;;
--spack-dev)
spack_dev=1
shift
Expand All @@ -52,70 +77,115 @@ while [[ $# -gt 0 ]]; do
with_valgrind="valgrind"
shift
;;
--with-spack)
with_spack=1
shift
;;
*)
echo "unknown option: $1"
exit
;;
esac
done

#
# Setup directories
#
export SPACK_HOME=${spack_home}
echo "SPACK_HOME=${SPACK_HOME}"
if [[ "${spack_reinstall}" -eq 1 ]]; then
\rm -Rf ${SPACK_HOME}
fi
\rm -Rf _build
#
# Configure gurobi
#
if [[ -z "${GUROBI_HOME}" ]]; then
with_gurobi="OFF"
else
with_gurobi="ON"
fi
#
# Configure clang
#
if [[ $clang -eq 1 ]]; then
export CXX=clang++
export CC=clang
fi
#
# Install spack
#
if test -d ${SPACK_HOME}; then
echo ""
echo "WARNING: Spack directory exists."
echo ""
else
echo ""
echo "Installing Coek dependencies using Spack"
echo ""
if [[ "$spack_dev" -eq 0 ]]; then
git clone https://github.com/or-fusion/spack.git ${SPACK_HOME}
if [[ "$with_spack" -eq 1 ]]; then
#
# Setup directories
#
export SPACK_HOME=${spack_home}
echo "SPACK_HOME=${SPACK_HOME}"
if [[ "${spack_reinstall}" -eq 1 ]]; then
\rm -Rf ${SPACK_HOME}
fi
if test -d _spack_tpls; then
cd _spack_tpls
git pull
cd ..
else
git clone [email protected]:or-fusion/spack.git ${SPACK_HOME}
if [[ "$spack_dev" -eq 0 ]]; then
\rm -Rf _spack_tpls
git clone --depth 1 https://github.com/or-fusion/or-fusion-spack-repo.git _spack_tpls
else
git clone [email protected]:or-fusion/or-fusion-spack-repo.git _spack_tpls
cd _spack_tpls
git checkout dev
git pull
cd ..
fi
fi
. ${SPACK_HOME}/share/spack/setup-env.sh
spack env create coekenv
spack env activate coekenv
spack add asl cppad fmt rapidjson catch2 highs $with_valgrind
spack install
spack env deactivate
fi
if test -d ${SPACK_HOME}; then
export SPACK_HOME=$(cd ${SPACK_HOME}; pwd)
echo "SPACK_HOME=${SPACK_HOME}"
#
# Configure gurobi
#
if [[ -z "${GUROBI_HOME}" ]]; then
with_gurobi="OFF"
else
with_gurobi="ON"
fi
#
# Configure clang
#
if [[ $clang -eq 1 ]]; then
export CXX=clang++
export CC=clang
fi
#
# Install spack
#
if test -d ${SPACK_HOME}; then
echo ""
echo "WARNING: Spack directory exists."
echo ""
else
echo ""
echo "Installing Coek dependencies using Spack"
echo ""
git clone --depth 1 https://github.com/spack/spack.git ${SPACK_HOME}
. ${SPACK_HOME}/share/spack/setup-env.sh
echo ""
echo "Removing _spack_tpls"
echo ""
spack repo remove `pwd`/_spack_tpls/repo | true
echo ""
echo "Adding _spack_tpls"
echo ""
spack repo add `pwd`/_spack_tpls/repo
spack repo list
spack external find
spack compiler find
spack env create $spack_env
spack env activate $spack_env
spack add asl [email protected] rapidjson catch2 highs $with_valgrind $with_scip
spack install
spack env deactivate
spack repo remove `pwd`/_spack_tpls/repo
fi
if test -d ${SPACK_HOME}; then
export SPACK_HOME=$(cd ${SPACK_HOME}; pwd)
echo ""
echo "SPACK_HOME=${SPACK_HOME}"
echo ""
fi
spack_cmake_options="-DCMAKE_PREFIX_PATH=${SPACK_HOME}/var/spack/environments/${spack_env}/.spack-env/view"
else
spack_cmake_options=""
with_python="OFF"
python_exe=""
with_gurobi="OFF"
with_highs="OFF"
with_fmtlib="OFF"
with_rapidjson="OFF"
with_catch="OFF"
with_asl="OFF"
fi
#
# Install coek
#
echo "Building Coek"
echo ""
\rm -Rf _build
mkdir _build
cd _build
cmake -DCMAKE_PREFIX_PATH=${SPACK_HOME}/var/spack/environments/coekenv/.spack-env/view -Dwith_debug=${debug} -Dwith_python=${with_python} $python_exe -Dwith_gurobi=$with_gurobi -Dwith_highs=ON -Dwith_cppad=ON -Dwith_fmtlib=ON -Dwith_rapidjson=ON -Dwith_catch2=ON -Dwith_tests=ON -Dwith_asl=ON -Dwith_openmp=OFF ..
cmake $spack_cmake_options -Dwith_debug=${debug} -Dwith_python=${with_python} -Dwith_pybind11=${with_python} $python_exe -Dwith_gurobi=$with_gurobi -Dwith_highs=$with_highs -Dwith_cppad=OFF -Dwith_fmtlib=$with_fmtlib -Dwith_rapidjson=$with_rapidjson -Dwith_catch2=$with_catch -Dwith_tests=$with_catch -Dwith_asl=$with_asl -Dwith_openmp=OFF -Dwith_compact=${compact} ..
make -j20
make install

4 changes: 2 additions & 2 deletions cmake/FindGUROBI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find_path(

find_library(
GUROBI_LIBRARY
NAMES gurobi gurobi81 gurobi90 gurobi95 gurobi100 gurobi110
NAMES gurobi gurobi81 gurobi90 gurobi95 gurobi100 gurobi1003 gurobi110 gurobi120
HINTS ${GUROBI_DIR} $ENV{GUROBI_HOME}
PATH_SUFFIXES lib)

Expand Down Expand Up @@ -40,7 +40,7 @@ find_library(
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
find_library(
GUROBI_CXX_LIBRARY
NAMES gurobi_g++5.2
NAMES gurobi_g++5.2 gurobi_g++8.5
HINTS ${GUROBI_DIR} $ENV{GUROBI_HOME}
PATH_SUFFIXES lib)
else()
Expand Down
Loading