Changeset 620 for branches/devel/Cbc


Ignore:
Timestamp:
Jun 6, 2007 4:20:56 PM (12 years ago)
Author:
andreasw
Message:

Added --enable-cbc-parallel configuration flag

Location:
branches/devel/Cbc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/configure

    r611 r620  
    11101110                          use disable-xpress-libcheck to skip the
    11111111                          link check at configuration time
     1112  --enable-cbc-parallel   enables compilation of the SMP version of Cbc
    11121113
    11131114Optional Packages:
     
    56695670*-*-irix6*)
    56705671  # Find out which ABI we are using.
    5671   echo '#line 5671 "configure"' > conftest.$ac_ext
     5672  echo '#line 5672 "configure"' > conftest.$ac_ext
    56725673  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    56735674  (eval $ac_compile) 2>&5
     
    68036804
    68046805# Provide some information about the compiler.
    6805 echo "$as_me:6805:" \
     6806echo "$as_me:6806:" \
    68066807     "checking for Fortran 77 compiler version" >&5
    68076808ac_compiler=`set X $ac_compile; echo $2`
     
    78707871   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    78717872   -e 's:$: $lt_compiler_flag:'`
    7872    (eval echo "\"\$as_me:7872: $lt_compile\"" >&5)
     7873   (eval echo "\"\$as_me:7873: $lt_compile\"" >&5)
    78737874   (eval "$lt_compile" 2>conftest.err)
    78747875   ac_status=$?
    78757876   cat conftest.err >&5
    7876    echo "$as_me:7876: \$? = $ac_status" >&5
     7877   echo "$as_me:7877: \$? = $ac_status" >&5
    78777878   if (exit $ac_status) && test -s "$ac_outfile"; then
    78787879     # The compiler can only warn and ignore the option if not recognized
     
    81388139   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81398140   -e 's:$: $lt_compiler_flag:'`
    8140    (eval echo "\"\$as_me:8140: $lt_compile\"" >&5)
     8141   (eval echo "\"\$as_me:8141: $lt_compile\"" >&5)
    81418142   (eval "$lt_compile" 2>conftest.err)
    81428143   ac_status=$?
    81438144   cat conftest.err >&5
    8144    echo "$as_me:8144: \$? = $ac_status" >&5
     8145   echo "$as_me:8145: \$? = $ac_status" >&5
    81458146   if (exit $ac_status) && test -s "$ac_outfile"; then
    81468147     # The compiler can only warn and ignore the option if not recognized
     
    82428243   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    82438244   -e 's:$: $lt_compiler_flag:'`
    8244    (eval echo "\"\$as_me:8244: $lt_compile\"" >&5)
     8245   (eval echo "\"\$as_me:8245: $lt_compile\"" >&5)
    82458246   (eval "$lt_compile" 2>out/conftest.err)
    82468247   ac_status=$?
    82478248   cat out/conftest.err >&5
    8248    echo "$as_me:8248: \$? = $ac_status" >&5
     8249   echo "$as_me:8249: \$? = $ac_status" >&5
    82498250   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    82508251   then
     
    1058710588  lt_status=$lt_dlunknown
    1058810589  cat > conftest.$ac_ext <<EOF
    10589 #line 10589 "configure"
     10590#line 10590 "configure"
    1059010591#include "confdefs.h"
    1059110592
     
    1068710688  lt_status=$lt_dlunknown
    1068810689  cat > conftest.$ac_ext <<EOF
    10689 #line 10689 "configure"
     10690#line 10690 "configure"
    1069010691#include "confdefs.h"
    1069110692
     
    1303113032   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1303213033   -e 's:$: $lt_compiler_flag:'`
    13033    (eval echo "\"\$as_me:13033: $lt_compile\"" >&5)
     13034   (eval echo "\"\$as_me:13034: $lt_compile\"" >&5)
    1303413035   (eval "$lt_compile" 2>conftest.err)
    1303513036   ac_status=$?
    1303613037   cat conftest.err >&5
    13037    echo "$as_me:13037: \$? = $ac_status" >&5
     13038   echo "$as_me:13038: \$? = $ac_status" >&5
    1303813039   if (exit $ac_status) && test -s "$ac_outfile"; then
    1303913040     # The compiler can only warn and ignore the option if not recognized
     
    1313513136   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1313613137   -e 's:$: $lt_compiler_flag:'`
    13137    (eval echo "\"\$as_me:13137: $lt_compile\"" >&5)
     13138   (eval echo "\"\$as_me:13138: $lt_compile\"" >&5)
    1313813139   (eval "$lt_compile" 2>out/conftest.err)
    1313913140   ac_status=$?
    1314013141   cat out/conftest.err >&5
    13141    echo "$as_me:13141: \$? = $ac_status" >&5
     13142   echo "$as_me:13142: \$? = $ac_status" >&5
    1314213143   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1314313144   then
     
    1470514706   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1470614707   -e 's:$: $lt_compiler_flag:'`
    14707    (eval echo "\"\$as_me:14707: $lt_compile\"" >&5)
     14708   (eval echo "\"\$as_me:14708: $lt_compile\"" >&5)
    1470814709   (eval "$lt_compile" 2>conftest.err)
    1470914710   ac_status=$?
    1471014711   cat conftest.err >&5
    14711    echo "$as_me:14711: \$? = $ac_status" >&5
     14712   echo "$as_me:14712: \$? = $ac_status" >&5
    1471214713   if (exit $ac_status) && test -s "$ac_outfile"; then
    1471314714     # The compiler can only warn and ignore the option if not recognized
     
    1480914810   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1481014811   -e 's:$: $lt_compiler_flag:'`
    14811    (eval echo "\"\$as_me:14811: $lt_compile\"" >&5)
     14812   (eval echo "\"\$as_me:14812: $lt_compile\"" >&5)
    1481214813   (eval "$lt_compile" 2>out/conftest.err)
    1481314814   ac_status=$?
    1481414815   cat out/conftest.err >&5
    14815    echo "$as_me:14815: \$? = $ac_status" >&5
     14816   echo "$as_me:14816: \$? = $ac_status" >&5
    1481614817   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1481714818   then
     
    1701617017   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1701717018   -e 's:$: $lt_compiler_flag:'`
    17018    (eval echo "\"\$as_me:17018: $lt_compile\"" >&5)
     17019   (eval echo "\"\$as_me:17019: $lt_compile\"" >&5)
    1701917020   (eval "$lt_compile" 2>conftest.err)
    1702017021   ac_status=$?
    1702117022   cat conftest.err >&5
    17022    echo "$as_me:17022: \$? = $ac_status" >&5
     17023   echo "$as_me:17023: \$? = $ac_status" >&5
    1702317024   if (exit $ac_status) && test -s "$ac_outfile"; then
    1702417025     # The compiler can only warn and ignore the option if not recognized
     
    1728417285   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1728517286   -e 's:$: $lt_compiler_flag:'`
    17286    (eval echo "\"\$as_me:17286: $lt_compile\"" >&5)
     17287   (eval echo "\"\$as_me:17287: $lt_compile\"" >&5)
    1728717288   (eval "$lt_compile" 2>conftest.err)
    1728817289   ac_status=$?
    1728917290   cat conftest.err >&5
    17290    echo "$as_me:17290: \$? = $ac_status" >&5
     17291   echo "$as_me:17291: \$? = $ac_status" >&5
    1729117292   if (exit $ac_status) && test -s "$ac_outfile"; then
    1729217293     # The compiler can only warn and ignore the option if not recognized
     
    1738817389   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1738917390   -e 's:$: $lt_compiler_flag:'`
    17390    (eval echo "\"\$as_me:17390: $lt_compile\"" >&5)
     17391   (eval echo "\"\$as_me:17391: $lt_compile\"" >&5)
    1739117392   (eval "$lt_compile" 2>out/conftest.err)
    1739217393   ac_status=$?
    1739317394   cat out/conftest.err >&5
    17394    echo "$as_me:17394: \$? = $ac_status" >&5
     17395   echo "$as_me:17395: \$? = $ac_status" >&5
    1739517396   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1739617397   then
     
    2222022221
    2222122222
    22222 #
     22223
     22224#############################################################################
     22225#                       Cbc parallel configuration                          #
     22226#############################################################################
     22227
     22228# First we define a new option, --enable-cbc-parallel
     22229
     22230# Check whether --enable-cbc-parallel or --disable-cbc-parallel was given.
     22231if test "${enable_cbc_parallel+set}" = set; then
     22232  enableval="$enable_cbc_parallel"
     22233
     22234fi;
     22235
     22236if test "$enable_cbc_parallel" = yes; then
     22237  # Define the preprocessor macro
     22238
     22239cat >>confdefs.h <<\_ACEOF
     22240#define CBC_THREAD 1
     22241_ACEOF
     22242
     22243  echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
     22244echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
     22245if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
     22246  echo $ECHO_N "(cached) $ECHO_C" >&6
     22247else
     22248  ac_check_lib_save_LIBS=$LIBS
     22249LIBS="-lrt  $LIBS"
     22250cat >conftest.$ac_ext <<_ACEOF
     22251/* confdefs.h.  */
     22252_ACEOF
     22253cat confdefs.h >>conftest.$ac_ext
     22254cat >>conftest.$ac_ext <<_ACEOF
     22255/* end confdefs.h.  */
     22256
     22257/* Override any gcc2 internal prototype to avoid an error.  */
     22258#ifdef __cplusplus
     22259extern "C"
     22260#endif
     22261/* We use char because int might match the return type of a gcc2
     22262   builtin and then its argument prototype would still apply.  */
     22263char clock_gettime ();
     22264int
     22265main ()
     22266{
     22267clock_gettime ();
     22268  ;
     22269  return 0;
     22270}
     22271_ACEOF
     22272rm -f conftest.$ac_objext conftest$ac_exeext
     22273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     22274  (eval $ac_link) 2>conftest.er1
     22275  ac_status=$?
     22276  grep -v '^ *+' conftest.er1 >conftest.err
     22277  rm -f conftest.er1
     22278  cat conftest.err >&5
     22279  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22280  (exit $ac_status); } &&
     22281         { ac_try='test -z "$ac_c_werror_flag"
     22282                         || test ! -s conftest.err'
     22283  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22284  (eval $ac_try) 2>&5
     22285  ac_status=$?
     22286  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22287  (exit $ac_status); }; } &&
     22288         { ac_try='test -s conftest$ac_exeext'
     22289  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22290  (eval $ac_try) 2>&5
     22291  ac_status=$?
     22292  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22293  (exit $ac_status); }; }; then
     22294  ac_cv_lib_rt_clock_gettime=yes
     22295else
     22296  echo "$as_me: failed program was:" >&5
     22297sed 's/^/| /' conftest.$ac_ext >&5
     22298
     22299ac_cv_lib_rt_clock_gettime=no
     22300fi
     22301rm -f conftest.err conftest.$ac_objext \
     22302      conftest$ac_exeext conftest.$ac_ext
     22303LIBS=$ac_check_lib_save_LIBS
     22304fi
     22305echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
     22306echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
     22307if test $ac_cv_lib_rt_clock_gettime = yes; then
     22308  ADDLIBS="-lrt $ADDLIBS"
     22309else
     22310  { { echo "$as_me:$LINENO: error: --enable-cbc-parallel selected, but -lrt unavailable" >&5
     22311echo "$as_me: error: --enable-cbc-parallel selected, but -lrt unavailable" >&2;}
     22312   { (exit 1); exit 1; }; }
     22313fi
     22314
     22315  echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
     22316echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
     22317if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
     22318  echo $ECHO_N "(cached) $ECHO_C" >&6
     22319else
     22320  ac_check_lib_save_LIBS=$LIBS
     22321LIBS="-lpthread  $LIBS"
     22322cat >conftest.$ac_ext <<_ACEOF
     22323/* confdefs.h.  */
     22324_ACEOF
     22325cat confdefs.h >>conftest.$ac_ext
     22326cat >>conftest.$ac_ext <<_ACEOF
     22327/* end confdefs.h.  */
     22328
     22329/* Override any gcc2 internal prototype to avoid an error.  */
     22330#ifdef __cplusplus
     22331extern "C"
     22332#endif
     22333/* We use char because int might match the return type of a gcc2
     22334   builtin and then its argument prototype would still apply.  */
     22335char pthread_create ();
     22336int
     22337main ()
     22338{
     22339pthread_create ();
     22340  ;
     22341  return 0;
     22342}
     22343_ACEOF
     22344rm -f conftest.$ac_objext conftest$ac_exeext
     22345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     22346  (eval $ac_link) 2>conftest.er1
     22347  ac_status=$?
     22348  grep -v '^ *+' conftest.er1 >conftest.err
     22349  rm -f conftest.er1
     22350  cat conftest.err >&5
     22351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22352  (exit $ac_status); } &&
     22353         { ac_try='test -z "$ac_c_werror_flag"
     22354                         || test ! -s conftest.err'
     22355  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22356  (eval $ac_try) 2>&5
     22357  ac_status=$?
     22358  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22359  (exit $ac_status); }; } &&
     22360         { ac_try='test -s conftest$ac_exeext'
     22361  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     22362  (eval $ac_try) 2>&5
     22363  ac_status=$?
     22364  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     22365  (exit $ac_status); }; }; then
     22366  ac_cv_lib_pthread_pthread_create=yes
     22367else
     22368  echo "$as_me: failed program was:" >&5
     22369sed 's/^/| /' conftest.$ac_ext >&5
     22370
     22371ac_cv_lib_pthread_pthread_create=no
     22372fi
     22373rm -f conftest.err conftest.$ac_objext \
     22374      conftest$ac_exeext conftest.$ac_ext
     22375LIBS=$ac_check_lib_save_LIBS
     22376fi
     22377echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
     22378echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
     22379if test $ac_cv_lib_pthread_pthread_create = yes; then
     22380  ADDLIBS="-lpthread $ADDLIBS"
     22381else
     22382  { { echo "$as_me:$LINENO: error: --enable-cbc-parallel selected, but -lpthreads unavailable" >&5
     22383echo "$as_me: error: --enable-cbc-parallel selected, but -lpthreads unavailable" >&2;}
     22384   { (exit 1); exit 1; }; }
     22385fi
     22386
     22387fi
    2222322388
    2222422389##############################################################################
  • branches/devel/Cbc/configure.ac

    r611 r620  
    1 # Copyright (C) 2006 International Business Machines.
     1# Copyright (C) 2006, 2007 International Business Machines.
    22# All Rights Reserved.
    33# This file is distributed under the Common Public License.
     
    133133  [Define to the name of the default solver to be used in cbc-generic in small letters])
    134134
    135 #
     135
     136#############################################################################
     137#                       Cbc parallel configuration                          #
     138#############################################################################
     139
     140# First we define a new option, --enable-cbc-parallel
     141
     142AC_ARG_ENABLE([cbc-parallel],
     143[AC_HELP_STRING([--enable-cbc-parallel],
     144                [enables compilation of the SMP version of Cbc])])
     145
     146if test "$enable_cbc_parallel" = yes; then
     147  # Define the preprocessor macro
     148  AC_DEFINE([CBC_THREAD],[1],[Define to 1 if the SMP version of Cbc should be compiled])
     149  AC_CHECK_LIB([rt],[clock_gettime],
     150               [ADDLIBS="-lrt $ADDLIBS"],
     151               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lrt unavailable])])
     152  AC_CHECK_LIB([pthread],[pthread_create],
     153               [ADDLIBS="-lpthread $ADDLIBS"],
     154               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lpthreads unavailable])])
     155fi
    136156
    137157##############################################################################
  • branches/devel/Cbc/inc/config_cbc.h.in

    r592 r620  
    44   letters */
    55#undef CBC_DEFAULT_SOLVER
     6
     7/* Define to 1 if the SMP version of Cbc should be compiled */
     8#undef CBC_THREAD
    69
    710/* Define to the debug sanity check level (0 is no test) */
Note: See TracChangeset for help on using the changeset viewer.