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

Build changes for COIN #1614

Merged
merged 9 commits into from
Nov 9, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Building Cyclus
run: |
mkdir -p `python -m site --user-site`
python install.py -j 2 --build-type=Release --core-version 999999.999999
python install.py -j 2 --build-type=Release --core-version 999999.999999 --allow-milps
echo "PATH=${HOME}/.local/bin:$PATH" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=${HOME}/.local/lib:${HOME}/.local/lib/cyclus:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Since last release
* Issue #1312. (#1560)
* fix sell_policy that was offering bids when capacity was inbetween 0 and the
quantize, bids that one was not able to fullfill and caused cyclus to crash. (#1552)
* Deprecation warnings involving <boost/detail/sp_typeinfo.hpp> (#1611)
* Resolve deprecation warnings involving <boost/detail/sp_typeinfo.hpp> (#1611)
* Resolve segmentation faults when calling Cbc (#1614)



Expand Down
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,10 @@ IF(NOT CYCLUS_DOC_ONLY)
MESSAGE("-- Boost Serialization location: ${Boost_SERIALIZATION_LIBRARY}")

# find coin and link to it
FIND_PACKAGE(COIN)
MESSAGE("-- COIN Version: ${COIN_VERSION}")
set(LIBS ${LIBS} ${COIN_LIBRARIES})
if(NOT COIN_FOUND)
# no COIN, so no MILPs
set(DEFAULT_ALLOW_MILPS false)
if(DEFAULT_ALLOW_MILPS)
FIND_PACKAGE(COIN REQUIRED)
MESSAGE("-- COIN Version: ${COIN_VERSION}")
set(LIBS ${LIBS} ${COIN_LIBRARIES})
endif()

#
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ WORKDIR /cyclus

# You may add the option "--cmake-debug" to the following command
# for further CMake debugging.
RUN python install.py -j ${make_cores} --build-type=Release --core-version 999999.999999
RUN python install.py -j ${make_cores} --build-type=Release --core-version 999999.999999 --allow-milps
ENV PATH /root/.local/bin:$PATH
ENV LD_LIBRARY_PATH /root/.local/lib:/root/.local/lib/cyclus

Expand Down
10 changes: 0 additions & 10 deletions src/OsiCbcSolverInterface.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
#include "CbcConfig.h"
#include "OsiCbcSolverInterface.hpp"

// CBC_VERSION_MAJOR defined for Cbc > 2.5
#ifndef CBC_VERSION_MAJOR
#include "OsiCbcSolverInterface_2_5.cpp"
#elif CBC_VERSION_MAJOR == 2 && CBC_VERSION_MINOR <= 8
#include "OsiCbcSolverInterface_2_8.cpp"
#elif CBC_VERSION_MAJOR == 2 && CBC_VERSION_MINOR <= 10
#include "OsiCbcSolverInterface_2_10.cpp"
#else
#error "Cyclus cannot yet handle your version of CoinCBC. Please open an issue with your CoinCBC version."
#endif


// for some reason these symbol doesn't exist in the mac binaries
// Those were also not present in condaforge/linux-anvil-comp7 docker container
Expand Down
10 changes: 0 additions & 10 deletions src/OsiCbcSolverInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@

// headers in this file below this pragma have all warnings shushed
#pragma GCC system_header

// CBC_VERSION_MAJOR defined for Cbc > 2.5
#ifndef CBC_VERSION_MAJOR
#include "OsiCbcSolverInterface_2_5.hpp"
#elif CBC_VERSION_MAJOR == 2 && CBC_VERSION_MINOR <= 8
#include "OsiCbcSolverInterface_2_8.hpp"
#elif CBC_VERSION_MAJOR == 2 && CBC_VERSION_MINOR <= 10
#include "OsiCbcSolverInterface_2_10.hpp"
#else
#error "Cyclus cannot yet handle your version of CoinCBC. Please open an issue with your CoinCBC version."
#endif

#endif