Changeset 74


Ignore:
Timestamp:
Mar 2, 2009 6:20:23 AM (12 years ago)
Author:
pbelotti
Message:

fixing segfault occurring with constant objective functions

Location:
stable/0.1/Couenne
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/0.1/Couenne/acinclude.m4

    r35 r74  
    64006400# This file is distributed under the Common Public License.
    64016401#
    6402 ## $Id: coin.m4 1112 2008-08-22 16:39:12Z andreasw $
     6402## $Id: coin.m4 1236 2009-02-21 19:17:22Z stefan $
    64036403#
    64046404# Author: Andreas Wachter    IBM      2006-04-14
     
    69246924# AC_MSG_NOTICE([C++ compiler candidates: $comps])
    69256925AC_PROG_CXX([$comps])
    6926 if test -z "$CXX" ; then
    6927   AC_MSG_ERROR([Failed to find a C++ compiler!])
    6928 fi
     6926
     6927#AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler
     6928#thus, we test here whether $CXX is actually working
     6929AC_LANG_PUSH(C++)
     6930AC_MSG_CHECKING([whether C++ compiler $CXX works]);
     6931AC_COMPILE_IFELSE(
     6932  [AC_LANG_PROGRAM(, [int i=0;])],
     6933  [AC_MSG_RESULT(yes)],
     6934  [AC_MSG_RESULT(no)
     6935   AC_MSG_ERROR(failed to find a C++ compiler or C++ compiler $CXX does not work)]
     6936)
     6937AC_LANG_POP(C++)
    69296938
    69306939# It seems that we need to cleanup something here for the Windows
     
    94919500#check if user provides a MUMPS library (that works)
    94929501AC_LANG_PUSH(C)
     9502SAVE_ADDLIBS="$ADDLIBS"
     9503ADDLIBS="$ADDLIBS $FLIBS"
    94939504AC_COIN_HAS_USER_LIBRARY(mumps, MUMPS, dmumps_c.h, dmumps_c)
     9505ADDLIBS="$SAVE_ADDLIBS"
    94949506AC_LANG_POP(C)
    94959507
  • stable/0.1/Couenne/configure

    r51 r74  
    35053505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    35063506
    3507 if test -z "$CXX" ; then
    3508   { { echo "$as_me:$LINENO: error: Failed to find a C++ compiler!" >&5
    3509 echo "$as_me: error: Failed to find a C++ compiler!" >&2;}
     3507
     3508#AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler
     3509#thus, we test here whether $CXX is actually working
     3510ac_ext=cc
     3511ac_cpp='$CXXCPP $CPPFLAGS'
     3512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     3513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     3514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     3515
     3516echo "$as_me:$LINENO: checking whether C++ compiler $CXX works" >&5
     3517echo $ECHO_N "checking whether C++ compiler $CXX works... $ECHO_C" >&6;
     3518cat >conftest.$ac_ext <<_ACEOF
     3519/* confdefs.h.  */
     3520_ACEOF
     3521cat confdefs.h >>conftest.$ac_ext
     3522cat >>conftest.$ac_ext <<_ACEOF
     3523/* end confdefs.h.  */
     3524
     3525int
     3526main ()
     3527{
     3528int i=0;
     3529  ;
     3530  return 0;
     3531}
     3532_ACEOF
     3533rm -f conftest.$ac_objext
     3534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3535  (eval $ac_compile) 2>conftest.er1
     3536  ac_status=$?
     3537  grep -v '^ *+' conftest.er1 >conftest.err
     3538  rm -f conftest.er1
     3539  cat conftest.err >&5
     3540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3541  (exit $ac_status); } &&
     3542         { ac_try='test -z "$ac_cxx_werror_flag"
     3543                         || test ! -s conftest.err'
     3544  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3545  (eval $ac_try) 2>&5
     3546  ac_status=$?
     3547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3548  (exit $ac_status); }; } &&
     3549         { ac_try='test -s conftest.$ac_objext'
     3550  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3551  (eval $ac_try) 2>&5
     3552  ac_status=$?
     3553  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3554  (exit $ac_status); }; }; then
     3555  echo "$as_me:$LINENO: result: yes" >&5
     3556echo "${ECHO_T}yes" >&6
     3557else
     3558  echo "$as_me: failed program was:" >&5
     3559sed 's/^/| /' conftest.$ac_ext >&5
     3560
     3561echo "$as_me:$LINENO: result: no" >&5
     3562echo "${ECHO_T}no" >&6
     3563   { { echo "$as_me:$LINENO: error: failed to find a C++ compiler or C++ compiler $CXX does not work" >&5
     3564echo "$as_me: error: failed to find a C++ compiler or C++ compiler $CXX does not work" >&2;}
    35103565   { (exit 1); exit 1; }; }
    3511 fi
     3566
     3567fi
     3568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3569ac_ext=cc
     3570ac_cpp='$CXXCPP $CPPFLAGS'
     3571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     3572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     3573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     3574
    35123575
    35133576# It seems that we need to cleanup something here for the Windows
     
    67886851*-*-irix6*)
    67896852  # Find out which ABI we are using.
    6790   echo '#line 6790 "configure"' > conftest.$ac_ext
     6853  echo '#line 6853 "configure"' > conftest.$ac_ext
    67916854  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    67926855  (eval $ac_compile) 2>&5
     
    79227985
    79237986# Provide some information about the compiler.
    7924 echo "$as_me:7924:" \
     7987echo "$as_me:7987:" \
    79257988     "checking for Fortran 77 compiler version" >&5
    79267989ac_compiler=`set X $ac_compile; echo $2`
     
    89899052   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    89909053   -e 's:$: $lt_compiler_flag:'`
    8991    (eval echo "\"\$as_me:8991: $lt_compile\"" >&5)
     9054   (eval echo "\"\$as_me:9054: $lt_compile\"" >&5)
    89929055   (eval "$lt_compile" 2>conftest.err)
    89939056   ac_status=$?
    89949057   cat conftest.err >&5
    8995    echo "$as_me:8995: \$? = $ac_status" >&5
     9058   echo "$as_me:9058: \$? = $ac_status" >&5
    89969059   if (exit $ac_status) && test -s "$ac_outfile"; then
    89979060     # The compiler can only warn and ignore the option if not recognized
     
    92579320   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    92589321   -e 's:$: $lt_compiler_flag:'`
    9259    (eval echo "\"\$as_me:9259: $lt_compile\"" >&5)
     9322   (eval echo "\"\$as_me:9322: $lt_compile\"" >&5)
    92609323   (eval "$lt_compile" 2>conftest.err)
    92619324   ac_status=$?
    92629325   cat conftest.err >&5
    9263    echo "$as_me:9263: \$? = $ac_status" >&5
     9326   echo "$as_me:9326: \$? = $ac_status" >&5
    92649327   if (exit $ac_status) && test -s "$ac_outfile"; then
    92659328     # The compiler can only warn and ignore the option if not recognized
     
    93619424   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    93629425   -e 's:$: $lt_compiler_flag:'`
    9363    (eval echo "\"\$as_me:9363: $lt_compile\"" >&5)
     9426   (eval echo "\"\$as_me:9426: $lt_compile\"" >&5)
    93649427   (eval "$lt_compile" 2>out/conftest.err)
    93659428   ac_status=$?
    93669429   cat out/conftest.err >&5
    9367    echo "$as_me:9367: \$? = $ac_status" >&5
     9430   echo "$as_me:9430: \$? = $ac_status" >&5
    93689431   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    93699432   then
     
    1170611769  lt_status=$lt_dlunknown
    1170711770  cat > conftest.$ac_ext <<EOF
    11708 #line 11708 "configure"
     11771#line 11771 "configure"
    1170911772#include "confdefs.h"
    1171011773
     
    1180611869  lt_status=$lt_dlunknown
    1180711870  cat > conftest.$ac_ext <<EOF
    11808 #line 11808 "configure"
     11871#line 11871 "configure"
    1180911872#include "confdefs.h"
    1181011873
     
    1415014213   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1415114214   -e 's:$: $lt_compiler_flag:'`
    14152    (eval echo "\"\$as_me:14152: $lt_compile\"" >&5)
     14215   (eval echo "\"\$as_me:14215: $lt_compile\"" >&5)
    1415314216   (eval "$lt_compile" 2>conftest.err)
    1415414217   ac_status=$?
    1415514218   cat conftest.err >&5
    14156    echo "$as_me:14156: \$? = $ac_status" >&5
     14219   echo "$as_me:14219: \$? = $ac_status" >&5
    1415714220   if (exit $ac_status) && test -s "$ac_outfile"; then
    1415814221     # The compiler can only warn and ignore the option if not recognized
     
    1425414317   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1425514318   -e 's:$: $lt_compiler_flag:'`
    14256    (eval echo "\"\$as_me:14256: $lt_compile\"" >&5)
     14319   (eval echo "\"\$as_me:14319: $lt_compile\"" >&5)
    1425714320   (eval "$lt_compile" 2>out/conftest.err)
    1425814321   ac_status=$?
    1425914322   cat out/conftest.err >&5
    14260    echo "$as_me:14260: \$? = $ac_status" >&5
     14323   echo "$as_me:14323: \$? = $ac_status" >&5
    1426114324   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1426214325   then
     
    1582415887   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1582515888   -e 's:$: $lt_compiler_flag:'`
    15826    (eval echo "\"\$as_me:15826: $lt_compile\"" >&5)
     15889   (eval echo "\"\$as_me:15889: $lt_compile\"" >&5)
    1582715890   (eval "$lt_compile" 2>conftest.err)
    1582815891   ac_status=$?
    1582915892   cat conftest.err >&5
    15830    echo "$as_me:15830: \$? = $ac_status" >&5
     15893   echo "$as_me:15893: \$? = $ac_status" >&5
    1583115894   if (exit $ac_status) && test -s "$ac_outfile"; then
    1583215895     # The compiler can only warn and ignore the option if not recognized
     
    1592815991   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1592915992   -e 's:$: $lt_compiler_flag:'`
    15930    (eval echo "\"\$as_me:15930: $lt_compile\"" >&5)
     15993   (eval echo "\"\$as_me:15993: $lt_compile\"" >&5)
    1593115994   (eval "$lt_compile" 2>out/conftest.err)
    1593215995   ac_status=$?
    1593315996   cat out/conftest.err >&5
    15934    echo "$as_me:15934: \$? = $ac_status" >&5
     15997   echo "$as_me:15997: \$? = $ac_status" >&5
    1593515998   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1593615999   then
     
    1813518198   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1813618199   -e 's:$: $lt_compiler_flag:'`
    18137    (eval echo "\"\$as_me:18137: $lt_compile\"" >&5)
     18200   (eval echo "\"\$as_me:18200: $lt_compile\"" >&5)
    1813818201   (eval "$lt_compile" 2>conftest.err)
    1813918202   ac_status=$?
    1814018203   cat conftest.err >&5
    18141    echo "$as_me:18141: \$? = $ac_status" >&5
     18204   echo "$as_me:18204: \$? = $ac_status" >&5
    1814218205   if (exit $ac_status) && test -s "$ac_outfile"; then
    1814318206     # The compiler can only warn and ignore the option if not recognized
     
    1840318466   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1840418467   -e 's:$: $lt_compiler_flag:'`
    18405    (eval echo "\"\$as_me:18405: $lt_compile\"" >&5)
     18468   (eval echo "\"\$as_me:18468: $lt_compile\"" >&5)
    1840618469   (eval "$lt_compile" 2>conftest.err)
    1840718470   ac_status=$?
    1840818471   cat conftest.err >&5
    18409    echo "$as_me:18409: \$? = $ac_status" >&5
     18472   echo "$as_me:18472: \$? = $ac_status" >&5
    1841018473   if (exit $ac_status) && test -s "$ac_outfile"; then
    1841118474     # The compiler can only warn and ignore the option if not recognized
     
    1850718570   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1850818571   -e 's:$: $lt_compiler_flag:'`
    18509    (eval echo "\"\$as_me:18509: $lt_compile\"" >&5)
     18572   (eval echo "\"\$as_me:18572: $lt_compile\"" >&5)
    1851018573   (eval "$lt_compile" 2>out/conftest.err)
    1851118574   ac_status=$?
    1851218575   cat out/conftest.err >&5
    18513    echo "$as_me:18513: \$? = $ac_status" >&5
     18576   echo "$as_me:18576: \$? = $ac_status" >&5
    1851418577   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1851518578   then
  • stable/0.1/Couenne/src/standardize/linStandardize.cpp

    r1 r74  
    7575  if ((nq==0) && (nl==0))
    7676
    77     ret = addAuxiliary (new exprConst (c0)); // a constant auxiliary? FIX!
     77    ret = new exprClone (addAuxiliary (new exprConst (c0))); // a constant auxiliary? FIX!
    7878
    7979  else if ((nq==0) && (fabs (c0) < COUENNE_EPS) && (nl==1)) { // a linear monomial, cx
Note: See TracChangeset for help on using the changeset viewer.