Changeset 2643


Ignore:
Timestamp:
Nov 20, 2012 2:53:08 PM (7 years ago)
Author:
stefan
Message:

build threadsafe per default, if pthread available

Location:
ThirdParty/SCIP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/SCIP/trunk/configure

    r2629 r2643  
    11121112  --disable-qsopt-libcheck
    11131113                          skip the link check at configuration time
     1114  --disable-scip-threadsafe
     1115                          do not build SCIP threadsafe (default=auto)
    11141116  --disable-zlib          do not compile with compression library zlib
    11151117  --disable-gmp           do not compile with GNU multiple precision library
     
    59645966*-*-irix6*)
    59655967  # Find out which ABI we are using.
    5966   echo '#line 5966 "configure"' > conftest.$ac_ext
     5968  echo '#line 5968 "configure"' > conftest.$ac_ext
    59675969  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    59685970  (eval $ac_compile) 2>&5
     
    70987100
    70997101# Provide some information about the compiler.
    7100 echo "$as_me:7100:" \
     7102echo "$as_me:7102:" \
    71017103     "checking for Fortran 77 compiler version" >&5
    71027104ac_compiler=`set X $ac_compile; echo $2`
     
    81658167   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81668168   -e 's:$: $lt_compiler_flag:'`
    8167    (eval echo "\"\$as_me:8167: $lt_compile\"" >&5)
     8169   (eval echo "\"\$as_me:8169: $lt_compile\"" >&5)
    81688170   (eval "$lt_compile" 2>conftest.err)
    81698171   ac_status=$?
    81708172   cat conftest.err >&5
    8171    echo "$as_me:8171: \$? = $ac_status" >&5
     8173   echo "$as_me:8173: \$? = $ac_status" >&5
    81728174   if (exit $ac_status) && test -s "$ac_outfile"; then
    81738175     # The compiler can only warn and ignore the option if not recognized
     
    84338435   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    84348436   -e 's:$: $lt_compiler_flag:'`
    8435    (eval echo "\"\$as_me:8435: $lt_compile\"" >&5)
     8437   (eval echo "\"\$as_me:8437: $lt_compile\"" >&5)
    84368438   (eval "$lt_compile" 2>conftest.err)
    84378439   ac_status=$?
    84388440   cat conftest.err >&5
    8439    echo "$as_me:8439: \$? = $ac_status" >&5
     8441   echo "$as_me:8441: \$? = $ac_status" >&5
    84408442   if (exit $ac_status) && test -s "$ac_outfile"; then
    84418443     # The compiler can only warn and ignore the option if not recognized
     
    85378539   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    85388540   -e 's:$: $lt_compiler_flag:'`
    8539    (eval echo "\"\$as_me:8539: $lt_compile\"" >&5)
     8541   (eval echo "\"\$as_me:8541: $lt_compile\"" >&5)
    85408542   (eval "$lt_compile" 2>out/conftest.err)
    85418543   ac_status=$?
    85428544   cat out/conftest.err >&5
    8543    echo "$as_me:8543: \$? = $ac_status" >&5
     8545   echo "$as_me:8545: \$? = $ac_status" >&5
    85448546   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    85458547   then
     
    1088210884  lt_status=$lt_dlunknown
    1088310885  cat > conftest.$ac_ext <<EOF
    10884 #line 10884 "configure"
     10886#line 10886 "configure"
    1088510887#include "confdefs.h"
    1088610888
     
    1098210984  lt_status=$lt_dlunknown
    1098310985  cat > conftest.$ac_ext <<EOF
    10984 #line 10984 "configure"
     10986#line 10986 "configure"
    1098510987#include "confdefs.h"
    1098610988
     
    1332613328   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1332713329   -e 's:$: $lt_compiler_flag:'`
    13328    (eval echo "\"\$as_me:13328: $lt_compile\"" >&5)
     13330   (eval echo "\"\$as_me:13330: $lt_compile\"" >&5)
    1332913331   (eval "$lt_compile" 2>conftest.err)
    1333013332   ac_status=$?
    1333113333   cat conftest.err >&5
    13332    echo "$as_me:13332: \$? = $ac_status" >&5
     13334   echo "$as_me:13334: \$? = $ac_status" >&5
    1333313335   if (exit $ac_status) && test -s "$ac_outfile"; then
    1333413336     # The compiler can only warn and ignore the option if not recognized
     
    1343013432   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1343113433   -e 's:$: $lt_compiler_flag:'`
    13432    (eval echo "\"\$as_me:13432: $lt_compile\"" >&5)
     13434   (eval echo "\"\$as_me:13434: $lt_compile\"" >&5)
    1343313435   (eval "$lt_compile" 2>out/conftest.err)
    1343413436   ac_status=$?
    1343513437   cat out/conftest.err >&5
    13436    echo "$as_me:13436: \$? = $ac_status" >&5
     13438   echo "$as_me:13438: \$? = $ac_status" >&5
    1343713439   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1343813440   then
     
    1500015002   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1500115003   -e 's:$: $lt_compiler_flag:'`
    15002    (eval echo "\"\$as_me:15002: $lt_compile\"" >&5)
     15004   (eval echo "\"\$as_me:15004: $lt_compile\"" >&5)
    1500315005   (eval "$lt_compile" 2>conftest.err)
    1500415006   ac_status=$?
    1500515007   cat conftest.err >&5
    15006    echo "$as_me:15006: \$? = $ac_status" >&5
     15008   echo "$as_me:15008: \$? = $ac_status" >&5
    1500715009   if (exit $ac_status) && test -s "$ac_outfile"; then
    1500815010     # The compiler can only warn and ignore the option if not recognized
     
    1510415106   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1510515107   -e 's:$: $lt_compiler_flag:'`
    15106    (eval echo "\"\$as_me:15106: $lt_compile\"" >&5)
     15108   (eval echo "\"\$as_me:15108: $lt_compile\"" >&5)
    1510715109   (eval "$lt_compile" 2>out/conftest.err)
    1510815110   ac_status=$?
    1510915111   cat out/conftest.err >&5
    15110    echo "$as_me:15110: \$? = $ac_status" >&5
     15112   echo "$as_me:15112: \$? = $ac_status" >&5
    1511115113   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1511215114   then
     
    1731117313   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1731217314   -e 's:$: $lt_compiler_flag:'`
    17313    (eval echo "\"\$as_me:17313: $lt_compile\"" >&5)
     17315   (eval echo "\"\$as_me:17315: $lt_compile\"" >&5)
    1731417316   (eval "$lt_compile" 2>conftest.err)
    1731517317   ac_status=$?
    1731617318   cat conftest.err >&5
    17317    echo "$as_me:17317: \$? = $ac_status" >&5
     17319   echo "$as_me:17319: \$? = $ac_status" >&5
    1731817320   if (exit $ac_status) && test -s "$ac_outfile"; then
    1731917321     # The compiler can only warn and ignore the option if not recognized
     
    1757917581   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1758017582   -e 's:$: $lt_compiler_flag:'`
    17581    (eval echo "\"\$as_me:17581: $lt_compile\"" >&5)
     17583   (eval echo "\"\$as_me:17583: $lt_compile\"" >&5)
    1758217584   (eval "$lt_compile" 2>conftest.err)
    1758317585   ac_status=$?
    1758417586   cat conftest.err >&5
    17585    echo "$as_me:17585: \$? = $ac_status" >&5
     17587   echo "$as_me:17587: \$? = $ac_status" >&5
    1758617588   if (exit $ac_status) && test -s "$ac_outfile"; then
    1758717589     # The compiler can only warn and ignore the option if not recognized
     
    1768317685   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1768417686   -e 's:$: $lt_compiler_flag:'`
    17685    (eval echo "\"\$as_me:17685: $lt_compile\"" >&5)
     17687   (eval echo "\"\$as_me:17687: $lt_compile\"" >&5)
    1768617688   (eval "$lt_compile" 2>out/conftest.err)
    1768717689   ac_status=$?
    1768817690   cat out/conftest.err >&5
    17689    echo "$as_me:17689: \$? = $ac_status" >&5
     17691   echo "$as_me:17691: \$? = $ac_status" >&5
    1769017692   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1769117693   then
     
    2289222894
    2289322895# check for NLP solvers
    22894 if test $scipver -ge 202 ; then
    2289522896
    2289622897echo "$as_me:$LINENO: checking for COIN-OR package Ipopt" >&5
     
    2340423405
    2340523406
    23406 else
    23407 
    23408 
    23409 if test 0 = 1; then
    23410   COIN_HAS_IPOPT_TRUE=
    23411   COIN_HAS_IPOPT_FALSE='#'
    23412 else
    23413   COIN_HAS_IPOPT_TRUE='#'
    23414   COIN_HAS_IPOPT_FALSE=
    23415 fi
    23416 
    23417 fi
    2341823407
    2341923408#############################################################################
     
    2342123410#############################################################################
    2342223411
    23423 EXTRAFLAGS="-DNPARASCIP"
     23412EXTRAFLAGS=""
     23413
     23414# Check whether --enable-scip-threadsafe or --disable-scip-threadsafe was given.
     23415if test "${enable_scip_threadsafe+set}" = set; then
     23416  enableval="$enable_scip_threadsafe"
     23417  scip_threadsafe=$enableval
     23418else
     23419  scip_threadsafe=auto
     23420fi;
     23421
     23422if test $scip_threadsafe = yes || test $scip_threadsafe = auto ; then
     23423  echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
     23424echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
     23425if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
     23426  echo $ECHO_N "(cached) $ECHO_C" >&6
     23427else
     23428  ac_check_lib_save_LIBS=$LIBS
     23429LIBS="-lpthread  $LIBS"
     23430cat >conftest.$ac_ext <<_ACEOF
     23431/* confdefs.h.  */
     23432_ACEOF
     23433cat confdefs.h >>conftest.$ac_ext
     23434cat >>conftest.$ac_ext <<_ACEOF
     23435/* end confdefs.h.  */
     23436
     23437/* Override any gcc2 internal prototype to avoid an error.  */
     23438#ifdef __cplusplus
     23439extern "C"
     23440#endif
     23441/* We use char because int might match the return type of a gcc2
     23442   builtin and then its argument prototype would still apply.  */
     23443char pthread_create ();
     23444int
     23445main ()
     23446{
     23447pthread_create ();
     23448  ;
     23449  return 0;
     23450}
     23451_ACEOF
     23452rm -f conftest.$ac_objext conftest$ac_exeext
     23453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     23454  (eval $ac_link) 2>conftest.er1
     23455  ac_status=$?
     23456  grep -v '^ *+' conftest.er1 >conftest.err
     23457  rm -f conftest.er1
     23458  cat conftest.err >&5
     23459  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     23460  (exit $ac_status); } &&
     23461         { ac_try='test -z "$ac_c_werror_flag"
     23462                         || test ! -s conftest.err'
     23463  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     23464  (eval $ac_try) 2>&5
     23465  ac_status=$?
     23466  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     23467  (exit $ac_status); }; } &&
     23468         { ac_try='test -s conftest$ac_exeext'
     23469  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     23470  (eval $ac_try) 2>&5
     23471  ac_status=$?
     23472  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     23473  (exit $ac_status); }; }; then
     23474  ac_cv_lib_pthread_pthread_create=yes
     23475else
     23476  echo "$as_me: failed program was:" >&5
     23477sed 's/^/| /' conftest.$ac_ext >&5
     23478
     23479ac_cv_lib_pthread_pthread_create=no
     23480fi
     23481rm -f conftest.err conftest.$ac_objext \
     23482      conftest$ac_exeext conftest.$ac_ext
     23483LIBS=$ac_check_lib_save_LIBS
     23484fi
     23485echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
     23486echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
     23487if test $ac_cv_lib_pthread_pthread_create = yes; then
     23488  SCIPLIB_LIBS="-lpthread $SCIPLIB_LIBS"
     23489                SCIPLIB_PCLIBS="-lpthread $SCIPLIB_PCLIBS"
     23490
     23491else
     23492  if test $scip_threadsafe = auto ; then
     23493                  { { echo "$as_me:$LINENO: error: --enable-cbc-parallel selected, but -lpthreads unavailable" >&5
     23494echo "$as_me: error: --enable-cbc-parallel selected, but -lpthreads unavailable" >&2;}
     23495   { (exit 1); exit 1; }; }
     23496                else
     23497                  { echo "$as_me:$LINENO: no pthreads, SCIP will not be threadsafe" >&5
     23498echo "$as_me: no pthreads, SCIP will not be threadsafe" >&6;}
     23499                  EXTRAFLAGS="$EXTRAFLAGS -DNPARASCIP"
     23500                fi
     23501
     23502fi
     23503
     23504else
     23505  EXTRAFLAGS="$EXTRAFLAGS -DNPARASCIP"
     23506fi
    2342423507
    2342523508
     
    2531425397Usually this means the macro was only invoked conditionally." >&5
    2531525398echo "$as_me: error: conditional \"SCIPLPI_NONE\" was never defined.
    25316 Usually this means the macro was only invoked conditionally." >&2;}
    25317    { (exit 1); exit 1; }; }
    25318 fi
    25319 if test -z "${COIN_HAS_IPOPT_TRUE}" && test -z "${COIN_HAS_IPOPT_FALSE}"; then
    25320   { { echo "$as_me:$LINENO: error: conditional \"COIN_HAS_IPOPT\" was never defined.
    25321 Usually this means the macro was only invoked conditionally." >&5
    25322 echo "$as_me: error: conditional \"COIN_HAS_IPOPT\" was never defined.
    2532325399Usually this means the macro was only invoked conditionally." >&2;}
    2532425400   { (exit 1); exit 1; }; }
  • ThirdParty/SCIP/trunk/configure.ac

    r2616 r2643  
    185185
    186186# check for NLP solvers
    187 if test $scipver -ge 202 ; then
    188   AC_COIN_CHECK_PACKAGE(Ipopt, ipopt, SCIPLib)
     187AC_COIN_CHECK_PACKAGE(Ipopt, ipopt, SCIPLib)
     188
     189#############################################################################
     190#                       Check for system header and libraries               #
     191#############################################################################
     192
     193EXTRAFLAGS=""
     194
     195AC_ARG_ENABLE([scip-threadsafe],
     196  AS_HELP_STRING([--disable-scip-threadsafe],[do not build SCIP threadsafe (default=auto)]),
     197  [scip_threadsafe=$enableval],
     198  [scip_threadsafe=auto]) 
     199
     200if test $scip_threadsafe = yes || test $scip_threadsafe = auto ; then
     201  AC_CHECK_LIB([pthread],[pthread_create],
     202               [SCIPLIB_LIBS="-lpthread $SCIPLIB_LIBS"
     203                SCIPLIB_PCLIBS="-lpthread $SCIPLIB_PCLIBS"
     204               ],
     205               [if test $scip_threadsafe = auto ; then
     206                  AC_MSG_ERROR([--enable-cbc-parallel selected, but -lpthreads unavailable])
     207                else
     208                  AC_MSG_NOTICE([no pthreads, SCIP will not be threadsafe])
     209                  EXTRAFLAGS="$EXTRAFLAGS -DNPARASCIP"
     210                fi
     211               ])
    189212else
    190   AM_CONDITIONAL(COIN_HAS_IPOPT, test 0 = 1)
    191 fi
    192 
    193 #############################################################################
    194 #                       Check for system header and libraries               #
    195 #############################################################################
    196 
    197 EXTRAFLAGS="-DNPARASCIP"
     213  EXTRAFLAGS="$EXTRAFLAGS -DNPARASCIP"
     214fi
    198215
    199216AC_COIN_CHECK_GNU_ZLIB(SCIPlib)
Note: See TracChangeset for help on using the changeset viewer.