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

make fails with CglGomory.cpp:33:10: fatal error: OsiClpSolverInterface.hpp: No such file or directory, RHEL 8 #96

Open
SomePersonSomeWhereInTheWorld opened this issue Jul 6, 2023 · 13 comments

Comments

@SomePersonSomeWhereInTheWorld

Any work around for this on RHEL 8?

make[1]: Entering directory '/path/to/me/Cgl/src/CglGomory'
  CXX      CglGomory.lo
CglGomory.cpp:33:10: fatal error: OsiClpSolverInterface.hpp: No such file or directory
 #include "OsiClpSolverInterface.hpp"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
@tkralphs
Copy link
Member

This shouldn't happen unless you are building in some non-standard way. A comprehensive guide for building projects in the Optimization Suite is here: https://coin-or.github.io/user_introduction.html. It's probably not anything specific to RHEL unless you are trying to link to packages installed with the system package manager and there is something non-standard about those packages.

My best guess right now is that you are somehow linking against a version of Osi that was built without the presence of Clp. This can't happen if you do one monolithic build, but could happen if you built projects individually in the wrong order. coinbrew is the recommended way of building that should avoid such issues.

If you could say more precisely how you built Cgl and what COIN-OR projects may have already been present on your system (e.g., were installed by the system package manager), I can probably guess what happened.

@SomePersonSomeWhereInTheWorld
Copy link
Author

This shouldn't happen unless you are building in some non-standard way. A comprehensive guide for building projects in the Optimization Suite is here: https://coin-or.github.io/user_introduction.html. It's probably not anything specific to RHEL unless you are trying to link to packages installed with the system package manager and there is something non-standard about those packages.

My best guess right now is that you are somehow linking against a version of Osi that was built without the presence of Clp. This can't happen if you do one monolithic build, but could happen if you built projects individually in the wrong order. coinbrew is the recommended way of building that should avoid such issues.

If you could say more precisely how you built Cgl and what COIN-OR projects may have already been present on your system (e.g., were installed by the system package manager), I can probably guess what happened.

I tried both coinbrew and configure, make, make install (well didn't get to the make install). I only specified the --prefix option. I tried with and without -C.

I didn't get too far with the other modules as it was a rabbit hole of must install Osi/Clp et al before finally stopping at Cgl. We do have lots of software available ad hoc as modules that can load.

@tkralphs
Copy link
Member

I don't think what you're seeing can happen if you're doing a clean build with coinbrew on a system without any COIN-OR packages installed anywhere already. There is something contaminating the build somehow. Can you go to a newly created directory and run

coinbrew fetch Cgl
coinbrew build Cgl -v 4 -p build -b

If you attach the full output here, then I should have enough information to see what's going on.

@SomePersonSomeWhereInTheWorld
Copy link
Author

Some good news. I went back and looked at the dependencies. I made sure to run ./configure on Data-Sample and re-ran the configure/make/make install on CoinUtils, Osi and Clp and Cgl installed.

However now when compiling Couenne I don't see a bin directory being created. Here are the results of make and notice there's no bin directory created under build:

make -j4
Making all in src/util
make[1]: Entering directory '/path/to/me/Couenne/build/src/util'
 CXX      drawCuts.lo
 CXX      rootQ.lo
 CXX      CouenneSparseMatrix.lo
 CXXLD    libCouenneUtil.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/util'
Making all in src/expression
make[1]: Entering directory '/path/to/me/Couenne/build/src/expression'
 CXX      domain.lo
 CXX      expression.lo
 CXX      exprOp.lo
 CXX      exprUnary.lo
 CXX      exprVar.lo
 CXX      exprAux.lo
 CXX      CouExpr.lo
 CXX      operators/exprAbs.lo
 CXX      operators/exprDiv.lo
 CXX      operators/exprExp.lo
 CXX      operators/exprInv.lo
 CXX      operators/exprLog.lo
 CXX      operators/exprMul.lo
 CXX      operators/exprTrilinear.lo
 CXX      operators/exprOpp.lo
 CXX      operators/exprPow.lo
 CXX      operators/exprSin.lo
 CXX      operators/exprCos.lo
 CXX      operators/exprSub.lo
 CXX      operators/exprSum.lo
 CXX      operators/exprMinMax.lo
 CXX      operators/exprGroup.lo
 CXX      operators/exprQuad.lo
 CXX      operators/compQuadFinBounds.lo
 CXX      operators/bounds/exprBQuad.lo
 CXX      partial/CouenneExprJac.lo
 CXX      partial/CouenneExprHess.lo
 CXX      ../convex/operators/conv-exprAbs.lo
 CXX      ../convex/operators/conv-exprDiv.lo
 CXX      ../convex/operators/conv-exprMul.lo
 CXX      ../convex/operators/conv-exprMul-genCuts.lo
 CXX      ../convex/operators/conv-exprMul-reformulate.lo
 CXX      ../convex/operators/conv-exprTrilinear.lo
 CXX      ../convex/operators/conv-exprTrilinear-gencuts.lo
 CXX      ../convex/operators/unifiedProdCuts.lo
 CXX      ../convex/operators/exprMul-upperHull.lo
 CXX      ../convex/operators/conv-exprOpp.lo
 CXX      ../convex/operators/conv-exprPow.lo
 CXX      ../convex/operators/conv-exprPow-getBounds.lo
 CXX      ../convex/operators/conv-exprPow-envelope.lo
 CXX      ../convex/operators/powNewton.lo
 CXX      ../convex/operators/conv-exprSub.lo
 CXX      ../convex/operators/conv-exprSum.lo
 CXX      ../convex/operators/conv-exprInv.lo
 CXX      ../convex/operators/conv-exprSinCos.lo
 CXX      ../convex/operators/conv-exprExp.lo
 CXX      ../convex/operators/conv-exprLog.lo
 CXX      ../convex/operators/conv-exprGroup.lo
 CXX      ../convex/operators/conv-exprQuad.lo
 CXX      ../convex/operators/trigNewton.lo
 CXX      ../convex/operators/alphaConvexify.lo
 CXX      ../convex/operators/quadCuts.lo
../../../src/expression/../convex/operators/alphaConvexify.cpp: In member function 'virtual bool Couenne::exprQuad::alphaConvexify(const Couenne::CouenneProblem*)':
../../../src/expression/../convex/operators/alphaConvexify.cpp:160:10: warning: 'void Ipopt::IpLapackDsyev(bool, Ipopt::Index, Ipopt::Number*, Ipopt::Index, Ipopt::Number*, Ipopt::Index&)' is deprecated [-Wdeprecated-declarations]
  Ipopt::IpLapackDsyev (true,   // compute eigenvector
         ^~~~~~~~~~~~~
In file included from ../../../src/expression/../convex/operators/alphaConvexify.cpp:14:
/path/to/me/.local/include/coin-or/IpLapack.hpp:108:13: note: declared here
inline void IpLapackDsyev(
            ^~~~~~~~~~~~~
../../../src/expression/../convex/operators/alphaConvexify.cpp:165:8: warning: 'void Ipopt::IpLapackDsyev(bool, Ipopt::Index, Ipopt::Number*, Ipopt::Index, Ipopt::Number*, Ipopt::Index&)' is deprecated [-Wdeprecated-declarations]
   info);  // output status variable
       ^
In file included from ../../../src/expression/../convex/operators/alphaConvexify.cpp:14:
/path/to/me/.local/include/coin-or/IpLapack.hpp:108:13: note: declared here
inline void IpLapackDsyev(
            ^~~~~~~~~~~~~
../../../src/expression/../convex/operators/alphaConvexify.cpp:165:8: warning: 'void Ipopt::IpLapackDsyev(bool, Ipopt::Index, Ipopt::Number*, Ipopt::Index, Ipopt::Number*, Ipopt::Index&)' is deprecated [-Wdeprecated-declarations]
   info);  // output status variable
       ^
In file included from ../../../src/expression/../convex/operators/alphaConvexify.cpp:14:
/path/to/me/.local/include/coin-or/IpLapack.hpp:108:13: note: declared here
inline void IpLapackDsyev(
            ^~~~~~~~~~~~~
 CXX      ../branch/operators/branchExprAbs.lo
 CXX      ../branch/operators/branchExprExp.lo
 CXX      ../branch/operators/branchExprDiv.lo
 CXX      ../branch/operators/branchExprInv.lo
 CXX      ../branch/operators/branchExprLog.lo
 CXX      ../branch/operators/branchExprMul.lo
 CXX      ../branch/operators/branchExprTrilinear.lo
 CXX      ../branch/operators/branchExprPow.lo
 CXX      ../branch/operators/branchExprQuad.lo
 CXX      ../branch/operators/branchExprSinCos.lo
 CXX      ../branch/operators/minMaxDelta.lo
 CXX      ../branch/operators/computeMulBrDist.lo
 CXXLD    libCouenneExpression.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/expression'
Making all in src/standardize
make[1]: Entering directory '/path/to/me/Couenne/build/src/standardize'
 CXX      decomposeTerm.lo
 CXX      linStandardize.lo
 CXX      sumStandardize.lo
 CXX      analyzeSparsity.lo
 CXX      constrStandardize.lo
 CXX      elementBreak.lo
 CXX      splitAux.lo
 CXX      auxiliarize.lo
 CXX      standardize.lo
 CXX      flattenMul.lo
 CXXLD    libCouenneStandardize.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/standardize'
Making all in src/problem
make[1]: Entering directory '/path/to/me/Couenne/build/src/problem'
 CXX      problem.lo
 CXX      CouenneProblem.lo
 CXX      problemIO.lo
 CXX      writeAMPL.lo
 CXX      writeGAMS.lo
 CXX      writeLP.lo
 CXX      constraint.lo
 CXX      fillQuadIndices.lo
 CXX      fillDependence.lo
 CXX      checkNLP.lo
 CXX      getIntegerCandidate.lo
 CXX      testIntFix.lo
 CXX      CouenneSOS.lo
 CXX      CouenneProblemConstructors.lo
 CXX      CouenneRestoreUnused.lo
 CXX      reformulate.lo
 CXX      CouenneGlobalCutOff.lo
 CXX      CouenneSymmetry.lo
 CXX      CouenneRecordBestSol.lo
 CXX      depGraph/depGraph.lo
 CXX      depGraph/checkCycles.lo
 CXXLD    libCouenneProblem.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/problem'
Making all in src/bound_tightening
make[1]: Entering directory '/path/to/me/Couenne/build/src/bound_tightening'
 CXX      boundTightening.lo
 CXX      aggressiveBT.lo
 CXX      fake_tightening.lo
 CXX      obbt.lo
 CXX      obbt_iter.lo
 CXX      tightenBounds.lo
 CXX      impliedBounds.lo
 CXX      FixPointConstructors.lo
 CXX      FixPointGenCuts.lo
 CXX      CouenneInfeasCut.lo
 CXX      obbt_supplement.lo
 CXX      BTPerfIndicator.lo
 CXX      BTPerfIndicatorConstr.lo
 CXX      CouenneAggrProbing.lo
 CXX      operators/impliedBounds-mul.lo
 CXX      operators/impliedBounds-sum.lo
 CXX      operators/impliedBounds-exprSum.lo
 CXX      operators/impliedBounds-exprDiv.lo
 CXX      operators/impliedBounds-exprMul.lo
 CXX      operators/impliedBounds-exprTrilinear.lo
 CXX      operators/impliedBounds-exprQuad.lo
 CXX      operators/impliedBounds-exprPow.lo
 CXX      ../main/BonCouenneInfo.lo
 CXXLD    libCouenneBoundTightening.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/bound_tightening'
Making all in src/bound_tightening/twoImpliedBT
make[1]: Entering directory '/path/to/me/Couenne/build/src/bound_tightening/twoImpliedBT'
 CXX      TwoImpliedConstructors.lo
 CXX      TwoImpliedIneqCombine.lo
 CXX      TwoImpliedGenCuts.lo
 CXXLD    libCouenneTwoImplied.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/bound_tightening/twoImpliedBT'
Making all in src/convex
make[1]: Entering directory '/path/to/me/Couenne/build/src/convex'
 CXX      addEnvelope.lo
 CXX      createCuts.lo
 CXX      CouenneCutGenerator.lo
 CXX      generateCuts.lo
 CXX      genColCuts.lo
 CXX      genRowCuts.lo
 CXX      updateBranchInfo.lo
 CXX      isOptimumCut.lo
 CXXLD    libCouenneConvex.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/convex'
Making all in src/branch
make[1]: Entering directory '/path/to/me/Couenne/build/src/branch'
 CXX      CouenneThreeWayBranchObj.lo
 CXX      CouenneBranchingObject.lo
 CXX      CouenneObject.lo
 CXX      CouenneVarObject.lo
 CXX      CouenneChooseVariable.lo
 CXX      CouenneChooseStrong.lo
 CXX      doStrongBranching.lo
 CXX      projections.lo
 CXX      infeasibility.lo
 CXX      infeasibilityVT.lo
 CXX      feasibleRegion.lo
 CXX      CouenneComplObject.lo
 CXX      CouenneComplBranchingObject.lo
 CXX      CouenneOrbitObj.lo
 CXX      CouenneOrbitBranchingObj.lo
 CXX      BranchCore.lo
 CXX      CouenneSOSObject.lo
 CXX      StrongBranchingSetupList.lo
 CXXLD    libCouenneBranch.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/branch'
Making all in src/disjunctive
make[1]: Entering directory '/path/to/me/Couenne/build/src/disjunctive'
 CXX      CouenneDisjCuts.lo
 CXX      generateDisjCuts.lo
 CXX      disjCut.lo
 CXX      getDisjunctions.lo
 CXX      separateWithDisjunction.lo
 CXX      singleDisjunctions.lo
 CXX      dummyVecMatr.lo
 CXX      OsiLinear2MatrVec.lo
 CXX      OsiCuts2MatrVec.lo
 CXXLD    libCouenneDisjunctive.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/disjunctive'
Making all in src/interfaces
make[1]: Entering directory '/path/to/me/Couenne/build/src/interfaces'
 CXX      BonCouenneInterface.lo
 CXX      CouenneTNLP.lo
 CXX      CouenneMINLPInterface.lo
 CXXLD    libCouenneInterfaces.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/interfaces'
Making all in src/heuristics
make[1]: Entering directory '/path/to/me/Couenne/build/src/heuristics'
 CXX      BonInitHeuristic.lo
 CXX      BonNlpHeuristic.lo
 CXX      CouenneFeasPumpConstructors.lo
 CXX      CouenneFeasPump.lo
 CXX      CouenneFPcreateMILP.lo
 CXX      CouenneFPSolveMILP.lo
../../../src/heuristics/CouenneFPcreateMILP.cpp: In function 'int PSDize(int, double*, double*, bool)':
../../../src/heuristics/CouenneFPcreateMILP.cpp:333:10: warning: 'void Ipopt::IpLapackDsyev(bool, Ipopt::Index, Ipopt::Number*, Ipopt::Index, Ipopt::Number*, Ipopt::Index&)' is deprecated [-Wdeprecated-declarations]
  Ipopt::IpLapackDsyev (true, n, A, n, eigenval, status);
         ^~~~~~~~~~~~~
In file included from ../../../src/heuristics/CouenneFPcreateMILP.cpp:13:
/path/to/me/.local/include/coin-or/IpLapack.hpp:108:13: note: declared here
inline void IpLapackDsyev(
            ^~~~~~~~~~~~~
../../../src/heuristics/CouenneFPcreateMILP.cpp:333:56: warning: 'void Ipopt::IpLapackDsyev(bool, Ipopt::Index, Ipopt::Number*, Ipopt::Index, Ipopt::Number*, Ipopt::Index&)' is deprecated [-Wdeprecated-declarations]
  Ipopt::IpLapackDsyev (true, n, A, n, eigenval, status);
                                                       ^
In file included from ../../../src/heuristics/CouenneFPcreateMILP.cpp:13:
/path/to/me/.local/include/coin-or/IpLapack.hpp:108:13: note: declared here
inline void IpLapackDsyev(
            ^~~~~~~~~~~~~
../../../src/heuristics/CouenneFPcreateMILP.cpp:333:56: warning: 'void Ipopt::IpLapackDsyev(bool, Ipopt::Index, Ipopt::Number*, Ipopt::Index, Ipopt::Number*, Ipopt::Index&)' is deprecated [-Wdeprecated-declarations]
  Ipopt::IpLapackDsyev (true, n, A, n, eigenval, status);
                                                       ^
In file included from ../../../src/heuristics/CouenneFPcreateMILP.cpp:13:
/path/to/me/.local/include/coin-or/IpLapack.hpp:108:13: note: declared here
inline void IpLapackDsyev(
            ^~~~~~~~~~~~~
 CXX      CouenneFPSolveNLP.lo
 CXX      CouenneFPFindSolution.lo
 CXX      CouenneFPpool.lo
 CXX      CouenneFPscipSolve.lo
 CXX      CouenneIterativeRounding.lo
 CXXLD    libCouenneHeuristics.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/heuristics'
Making all in src/cut/sdpcuts
make[1]: Entering directory '/path/to/me/Couenne/build/src/cut/sdpcuts'
 CXX      CouenneSdpCuts.lo
 CXX      CouennePSDcon.lo
 CXX      CouenneMatrix.lo
 CXX      CutGen.lo
 CXX      CutGenSparse.lo
 CXX      dsyevx_wrapper.lo
 CXXLD    libCouenneSdpCuts.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/cut/sdpcuts'
Making all in src/cut/crossconv
make[1]: Entering directory '/path/to/me/Couenne/build/src/cut/crossconv'
 CXX      CrossConvConstructors.lo
 CXX      CrossConvGenCuts.lo
 CXX      CrossConvSetup.lo
 CXXLD    libCouenneCrossConv.la
make[1]: Leaving directory '/path/to/me/Couenne/build/src/cut/crossconv'
Making all in src
make[1]: Entering directory '/path/to/me/Couenne/build/src'
make  all-am
make[2]: Entering directory '/path/to/me/Couenne/build/src'
 CXX      main/CouenneBab.lo
 CXX      main/BonCouenneSetup.lo
 CXX      main/SmartAslDestr.lo
 CXXLD    libCouenne.la
make[2]: Leaving directory '/path/to/me/Couenne/build/src'
make[1]: Leaving directory '/path/to/me/Couenne/build/src'
Making all in src/main
make[1]: Entering directory '/path/to/me/Couenne/build/src/main'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/path/to/me/Couenne/build/src/main'
make[1]: Entering directory '/path/to/me/Couenne/build'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/path/to/me/Couenne/build'

And here are the results from ./configure:

./configure -C --prefix=/path/to/me/.local
configure: creating cache config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking whether g++ understands -c and -o together... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3458764513820540925
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the archiver (ar) interface... ar
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for pkgconf... pkgconf
checking pkgconf is at least version 0.16.0... yes: 1.4.2
configure: pkgconf path is "/path/to/me/.local/lib/pkgconfig:"
checking for package Bonmin... yes
checking for package ASL... no
checking for package OsiCpx... no
checking for package OsiGrb... no
checking for package OsiMsk... no
checking for package OsiSpx... no
checking for package OsiXpr... no
checking for package Nauty... no
checking for library SCIP with link check... no (bare link)
configure: Linker flags are "-lscipsolver". Use --with-scip-lflags to overwrite. Check config.log for details of failed link attempt.
checking for library Cplex with link check... no (bare link)
configure: Linker flags are "-lcplex -lpthread -lm -ldl". Use --with-cplex-lflags to overwrite. Check config.log for details of failed link attempt.
checking for LAPACK... yes: Intel MKL (-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm)
checking for cstdint... yes
configure: configuring doxygen documentation options
checking for doxygen... no
checking for latex... no
checking for dot... YES
configure: updating cache config.cache
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test/Makefile
config.status: creating src/main/Makefile
config.status: creating src/bound_tightening/Makefile
config.status: creating src/bound_tightening/twoImpliedBT/Makefile
config.status: creating src/branch/Makefile
config.status: creating src/convex/Makefile
config.status: creating src/interfaces/Makefile
config.status: creating src/heuristics/Makefile
config.status: creating src/disjunctive/Makefile
config.status: creating src/cut/crossconv/Makefile
config.status: creating src/cut/sdpcuts/Makefile
config.status: creating src/expression/Makefile
config.status: creating src/problem/Makefile
config.status: creating src/standardize/Makefile
config.status: creating src/util/Makefile
config.status: creating src/Makefile
config.status: creating test/grandTest.sh
config.status: creating couenne.pc
config.status: creating doxydoc/doxygen.conf
config.status: creating src/config.h
config.status: creating src/config_couenne.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Configuration of Couenne successful

I do have to load a module for Intel Parallel Studio otherwise I get these errors:

/usr/bin/ld: cannot find -lmkl_intel_lp64
/usr/bin/ld: cannot find -lmkl_sequential
/usr/bin/ld: cannot find -lmkl_core
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:670: libCouenne.la] Error 1
make[2]: Leaving directory '/path/to/me/make[1]: Leaving directory '/path/to/me/Couenne/build/src'
make: *** [Makefile:452: all-recursive] Error 1

Did I miss a step?

@svigerske
Copy link
Member

The couenne executable can only be used for AMPL's .nl files. It is thus only build when ASL has been made available (https://github.com/coin-or-tools/ThirdParty-ASL).

configure found that Intel MKL is available at configure time:

checking for LAPACK... yes: Intel MKL (-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm)

It's not clear to me why these flags wouldn't work at buildtime.

@SomePersonSomeWhereInTheWorld
Copy link
Author

The couenne executable can only be used for AMPL's .nl files. It is thus only build when ASL has been made available (https://github.com/coin-or-tools/ThirdParty-ASL).

OK so I ran the configure/make/make install on ASL then re-ran the same for Couenne, still no bin directory.

configure found that Intel MKL is available at configure time:

checking for LAPACK... yes: Intel MKL (-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm)

Yes I had to load the Intel Parallal Studio module

It's not clear to me why these flags wouldn't work at buildtime.

Did I skip a step to get couenne to be built via the make command? Is there a way to install Couenne after ASL has been built that I just missed?

@tkralphs
Copy link
Member

You may need to re-build some of the dependencies as well, since they also need to be aware of ASL. Off the top of my head I'm not sure exactly which ones, though. I would just rebuild from scratch, but if you want to avoid the headache of doing each build manually, coinbrew will do all of this for you, including downloading ASL, building it, etc.

@svigerske
Copy link
Member

You may need to re-build some of the dependencies as well, since they also need to be aware of ASL. Off the top of my head I'm not sure exactly which ones, though.

Ah yes, Couenne also needs the Bonmin/ASL lib, if that exists, otherwise the Ipopt/ASL lib.

@SomePersonSomeWhereInTheWorld
Copy link
Author

On the Bonmin page

If the ASL source had been obtained, this installs the executable bonmin in Bonmin-1.8/bin. In what follows, we assume that you have put the executable bonmin on your path.

What does the "if" mean? How are they obtained alongside bonmin source files?

And on the Couenne page, the instructions say:

cd Couenne
cd ThirdParty      # Read INSTALL.* file in each subdirectory and get third party software
cd ..

However when trying this with git clone (svn not currently installed), no ThirdParty subdirectory is created.

So should I git clone https://github.com/coin-or-tools/ThirdParty-ASL into Bonmin and the configure/make/make install?

I tried that still no couenne binary. Is there another ThirdParty repo?

Side note, broken link on the Couenne page for general installation instructions for COIN-OR projects.

@tkralphs
Copy link
Member

tkralphs commented Jul 11, 2023

You should use the documentation here as the source of truth and disregard documentation within the Bonmin and Couenne projects for the most part (for now). Any links to projects.coin-or.org are out of date. Everything has been moved to Github. All of this will be fixed, but bandwidth is limited.

In a nutshell, as long as you build and install ASL before configuring, building, and installing Bonmin and Couenne (and possibly Ipopt?) and as long as everything is installed in the same prefix, things should just work. (pkg-config is used by all projects to detect other projects, so all that is really required is that the .pc file for ASL is in the PKG_CONFIG_PATH, which includes the prefix by default). You can easily check to make sure ASL is detected by looking at the output of configure.

The complexity of getting all of this right is the reason coinbrew exists and I think you would save yourself a lot of trouble by letting it do the work. But if you are one of those people (like me) who enjoys getting under the hood, then by all means, have at it!

@SomePersonSomeWhereInTheWorld
Copy link
Author

The complexity of getting all of this right is the reason coinbrew exists and I think you would save yourself a lot of trouble by letting it do the work. But if you are one of those people (like me) who enjoys getting under the hood, then by all means, have at it!

Indeed I wanted to see what happens with the individual packages. I see in https://github.com/coin-or/Cgl coinbrew is referenced.

/coinbrew build Cgl --prefix=/path/to/me/.local
./coinbrew build couenne --prefix=/path/to/me/.local
make install

boom:

which couenne
~/.local/bin/couenne
couenne --help
Couenne 0.5.8 -- an Open-Source solver for Mixed Integer Nonlinear Optimization
Mailing list: couenne@list.coin-or.org
Instructions: http://www.coin-or.org/Couenne
usage: couenne [options] stub [-AMPL] [<assignment> ...]

Options:
	--  {end of options}
	-=  {show name= possibilities}
	-?  {show usage}
	-bf {read boundsfile f}
	-e  {suppress echoing of assignments}
	-of {write .sol file to file f}
	-s  {write .sol file (without -AMPL)}
	-v  {just show version}

But nowhere do I see to run make install, I just took a shot and it worked.

@tkralphs
Copy link
Member

tkralphs commented Jul 11, 2023

All you actually need is

./coinbrew build Couenne --prefix=/path/to/me/.local

This will fetch and build all dependencies, including Cgl. In fact, you can get in trouble if you do it in two steps, as you did, since you can end up with a version of Cgl that is incompatible with the version of Couenne you request (coinbrew takes care of making sure all the versions of dependencies are compatible). But it seems you fortunately didn't run into that.

You don't need make install either, I have no idea how it had any effect when you did it, since there shouldn't be a Makefile in the directory where you run coinbrew. coinbrew does the full configure, make, make install for all dependencies and for the main project.

@SomePersonSomeWhereInTheWorld
Copy link
Author

I tried this on our RHEL 7 cluster where the latest blas available is blas-3.4.2-8.el7.x86_64 or as a module blas/gcc/64/3.8.0 but I see this:

#################################################
### Building ThirdParty/Blas 1.4.8 
##################################################

make: *** No rule to make target `dnrm2.f', needed by `dnrm2.lo'.  Stop.

Error: Build failed, see error output above

Edit: I see the skip option but no matter what I try, e.g., skip=blas, skip=openblas, as well as other variations, it doesn't skip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants