[Coin-discuss] Running Bcp on Windows
Laszlo Ladanyi
ladanyi at us.ibm.com
Wed Oct 29 16:39:08 EST 2003
Thanks! I have committed your changes (with one difference: I have changed to
using CoinCpuTime() from BCP_time_since_epoch()). Please check it out and
verify that it works correctly.
Thanks again,
--Laci
On Tue, 28 Oct 2003, Jörg Herbers wrote:
> Hi Laci,
>
> <ctime> (instead of <time.h>) works without any further changes.
>
> Below, you'll find my "statement of origin". Let me know if you additionally
> need a hardcopy.
>
> By the way: I didn't try to get the BCP features for parallel execution
> running, and I don't know if the message passing interfaces can be ported to
> Windows/VC7. The code works on a single machine, using BCP_message_single.
>
> Jörg
>
>
> ===============================================================================
>
> CONTRIBUTOR'S STATEMENT OF ORIGIN
>
> I, Jörg Herbers:
>
> (a) represent that
>
> I am the only author and owner of the software
>
> described as "patches to compile BCP under VC++.NET", and
>
> (b) represent that either
>
> (i) this software was neither derived in any other way nor otherwise
>
> copied from any other software, or
>
> (ii) that any exception to (i) is software which was obtained under the
>
> CPL (Common Public License), and
>
> (c) hereby agree to license this software under the CPL.
>
> ================================================================================
>
>
>
> >>>ladanyi at us.ibm.com 10/27/2003 5:31:19 PM >>>
> Hi Jorg,
>
> Great work! I'll put in these changes into the repository, just I need you
> to
> fill out the mini-COO (certificate of origin) below. The description would
> be,
> I guess, "patches to compile BCP under VC++.NET" or something similar.
>
> BTW, could you try whether one could include <ctime> instead of <time.h>?
> After all, ctime is the correct C++ header, but I know that it doesn't work
> on
> some systems.
>
> Thanks,
> --Laci
>
> ===============================================================================
>
> CONTRIBUTOR'S STATEMENT OF ORIGIN
>
> I/We, ______________, ______________, and ______________:
>
> (a) represent that
>
> I/we am/are the only author/authors and owner/owners of the software
>
> described as/entitled ____________________________, and
>
> (b) represent that either
>
> (i) this software was neither derived in any other way nor otherwise
>
> copied from any other software, or
>
> (ii) that any exception to (i) is software which was obtained under the
>
> CPL (Common Public License), and
>
> (c) hereby agree to license this software under the CPL.
>
> ================================================================================
>
> On Wed, 22 Oct 2003, Jörg Herbers wrote:
>
> >Hi Jesper,
> >
> >BCP compiles on cygwin and with some modifications on Visual C++ .NET 2003.
> >Most of the necessary changes are due to persistent problems of VC7 with
> >templates:
> >
> >BCP_lp_branching.cpp:275: const int maxind = std::max<int>(rownum, colnum);
> >BCP_lp_colrow.cpp:401:
> >std::min<size_t>(p.param(BCP_lp_par::MaxCutsAddedPerIteration),
> >BCP_lp_colrow.cpp:495:
> >std::min<size_t>(p.param(BCP_lp_par::MaxVarsAddedPerIteration),
> >BCP_lp_create_lp.cpp:125: const int num = std::max<int>(varnum, cutnum);
> >BCP_lp_fathom.cpp:260: std::max<const size_t>(
> >BCP_lp_generate_cuts.cpp:166: tout = std::max<double>(0.0, tout -
> >(BCP_time_since_epoch() - tin));
> >BCP_lp_generate_vars.cpp:162: tout = std::max<double>(0.0, tout -
> >(CoinCpuTime() - tin));
> >BCP_lp_main.cpp:32: p.node->vars.reserve(std::max<int>(1000, 3 * bvarnum));
> >BCP_lp_main.cpp:42: p.node->cuts.reserve(std::max<int>(1000, 3 * bcutnum));
> >BCP_lp_pool.cpp:8: _violation = std::max<double>( 0.0,
> >std::max<double>(_row->LowerBound()-lhs,
> >BCP_message_single.cpp:251: _lp_prob->upper_bound =
> >std::min<double>(_tm_prob->ub(), DBL_MAX/2);
> >
> >BCP_timeout.cpp needs the following extensions:
> >
> >#if defined(_MSC_VER) && (_MSC_VER > 1300)
> ># include <time.h>
> >#endif
> >
> >double BCP_time_since_epoch() {
> > BCP_DEFAULT_NAMESPACE;
> >#if defined(_MSC_VER)
> > unsigned int ticksnow;
> > ticksnow = (unsigned int)clock();
> > return (double)((double)ticksnow/CLOCKS_PER_SEC);
> >#else
> > /* ... as before ... */
> >#endif
> >}
> >
> >Furthermore, I use an OS specific header file (BCP_msvc.hpp):
> >
> >#ifndef _BCP_MSVC
> >#define _BCP_MSVC
> >
> >typedef int BCP_IndexType;
> >
> ># define setpriority(x,y,z)
> ># define BCP_USE_RUSAGE 0
> ># include <Windows.h>
> ># define gethostname(c, l) { DWORD cnlen = l; GetComputerName(c, &cnlen);
> >}
> ># include <process.h>
> ># define BCP_PtrDiff int
> ># define BCP_DEFAULT_NAMESPACE
> >
> ># define NEED_TEMPLATE_CLASSES
> >// # define NEED_TEMPLATE_FUNCTIONS
> >// # define NEED_STD_TEMPLATE_FUNCTIONS
> >// # define NEED_IMPLICIT_TEMPLATE_CLASSES
> >// # define NEED_IMPLICIT_TEMPLATE_FUNCTIONS
> ># define BCP_CONSTRUCT std::_Construct
> ># define BCP_DESTROY std::_Destroy
> >//# define BCP_DESTROY_RANGE std::_Destroy_range
> >
> >template<class T> inline void BCP_DESTROY_RANGE(T *first, T *last)
> >{
> > for (; first != last; ++first)
> > BCP_DESTROY(first);
> >}
> >
> >#endif
> >
> >which is included in BCP_os.hpp:
> >
> >#if defined(_MSC_VER) && (_MSC_VER > 1300)
> ># include "BCP_msvc.hpp"
> >#endif
> >
> > >From my viewpoint, it would be helpful to integrate these changes in BCP.
> >But since the changes are due to compiler flaws, this again leads us to the
> >discussion on how many and which compilers BCP should support...
> >
> >Jörg
> >
> >
> > >>>jpfasano at us.ibm.com 10/20/2003 6:39:10 PM >>>
> >
> >
> >
> >
> >Hi Jesper,
> >I believe BCP will compile using CYGWIN on Windows.
> >
> >JP Fasano
> >jpfasano at us.ibm.com (914)945-1324 (tie line 862-1324)
> >COIN www.coin-or.org
> >
> >
> >
> > ladanyi at watson.ibm.com Sent
> >by: To: COIN-discuss
> ><coin-discuss at oss.software.ibm.com>
> > coin-discuss-admin at www- cc:
> > 124.ibm.com Subject: Re:
> >[Coin-discuss] Running Bcp on Windows
> >
> >
> > 10/20/2003 11:48 AM
> > Please respond to
> > coin-discuss
> >
> >
> >
> >
> >
> >
> >Hi Jesper,
> >
> >Yes, I tried it, and it's a no go. BCP uses templated member functions and
> >VC++-6.0 can't handle them. It claims that there's a syntax error. I boiled
> >the problem down to a trivial example, contacted Microsoft and they
> >admitted
> >the error in the compiler.
> >
> >On the bright side, VC++-7 is supposed to be much more standards compliant,
> >so
> >you may get Bcp working with it.
> >
> >Good luck,
> >--Laci
> >
> >On Mon, 20 Oct 2003, Jesper Hansen wrote:
> >
> > >Hi
> > >
> > >I'm trying to get Bcp running on Windows with Visual C++ 6.0. However I
> >get
> > >a huge number of compilation errors. Have anyone tried this before?
> > >Experiences would be much appreciated.
> > >
> > >For instance I get the following error (which does not seem to be an
> >error):
> > >
> > >e:\COIN\Bcp\include\BCP_vector.hpp(299) : error C2039: 'const_iterator' :
> >is
> > >not a member of 'BCP_vec<int>'
> > >
> > >Another issue is the os specific header files...
> > >
> > >'Jesper
> > >
> > >
> > >---
> > >Jesper Hansen mailto:jesper at carmenconsulting.com Carmen
> > >Consulting, Købmagergade 53 3., DK-1150 Kbh K, Denmark
> > >Telephone: +45 33 17 91 92 Mobile: +45 61 33 29 69
> > >http://www.carmenconsulting.com >
> > >
> > >_______________________________________________
> > >Coin-discuss mailing list
> > >Coin-discuss at www-124.ibm.com
> > >http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss >
> >
> >_______________________________________________
> >Coin-discuss mailing list
> >Coin-discuss at www-124.ibm.com
> >http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
> >
> >
> >
> >_______________________________________________
> >Coin-discuss mailing list
> >Coin-discuss at www-124.ibm.com
> >http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
> >
> >_________________________________________________________________
> >Protect your PC - get McAfee.com VirusScan Online
> >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> >
> >_______________________________________________
> >Coin-discuss mailing list
> >Coin-discuss at www-124.ibm.com
> >http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
> >
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at www-124.ibm.com
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at www-124.ibm.com
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
>
More information about the Coin-discuss
mailing list