[OS] Re: A bit more on ASL and Msys

Bob Fourer 4er at ampl.com
Sun Aug 26 00:59:25 EDT 2007



> "Unfortunately, I'm not anAMPLuser and I don't have a good
> idea of how and where this function would be used."

I think matherr is used to signal failures in evaluating nonlinear
functions, such as division by zero and overflow.

Bob Fourer
4er at iems.northwestern.edu


> ----- Original Message -----
> From: "Kipp Martin" <kipp.mar... at chicagogsb.edu>
> To: "Lou Hafer" <l... at cs.sfu.ca>
> Cc: <o... at list.coin-or.org>
> Sent: Friday, August 24, 2007 8:30 PM
> Subject: Re: [OS] A bit more on ASL and Msys
>
> > Hi Lou:
>
> > I am able to build and run OS on MSys/cl using ASL with no problem, but
> > I am building with just
>
> > ./configure
>
> > I want to try to duplicate exactly what you are doing. What is your
> > command line when you run configure?
>
> > Thanks
>
> >> I took time on Wednesday to play with building OS/trunk under Msys, with
> >> ASL in the mix.  It looks like you've removed the use of the
> >> /mingw/include, and
> >> I had no problems there.  I still have difficulty with linking when ASL
> >> is
> >> present.  A few bits of information to think about:
>
> >> Library incompatibility seems to be the base issue.  When ASL is built
> >> with the compile_MS_ASL script, the script copies source files from
> >> ASL/solver
> >> into a build directory and then calls nmake with solvers/makefile.vc as
> >> the
> >> makefile.  Makefile.vc forces a set of C flags:
>
> >>   CFLAGS = -nologo -Ot1 -MT
>
> >> When I build in debug mode, this causes an immediate link problem for
> >> cbc, because the standard Coin debug build specifies -MTd. An optimised
> >> build
> >> has no trouble at this point, because Coin specifies -MT for the
> >> optimised
> >> build.
>
> >> Changing makefile.vc to specify -MTd / -MT as appropriate gets past cbc,
> >> but ultimately both debug and optimised builds founder on
> >> OS/src/OSSolverService.exe, with the message
>
> >>   amplsolv.lib(fpinitmt.obj) : error LNK2005: __matherr already defined
> >> in
> >>     LIBCMT.lib(matherr.obj)
> >>   Creating library OSSolverService.lib and object OSSolverService.exp
> >>   OSSolverService.exe : fatal error LNK1169: one or more multiply defined
> >>     symbols found
>
> >> Looking in ASL/solvers/fpinitmt.c, down toward the end of the file
> >> there's the code below, which defines a matherr subroutine.  When I added
> >> the
> >> #if 0 ...  endif guard to suppress this code, the build and link works
> >> just
> >> dandy.  OS claims it passes all its unit tests, but my guess is that this
> >> is not
> >> a conclusive test.  Unfortunately, I'm not anAMPLuser and I don't have
> >> a good
> >> idea of how and where this function would be used.
>
> >> #ifdef __MINGW32__
> >> #define matherr _matherr
> >> #endifLou
>
> >> #if 0
> >>  matherr_rettype
> >> matherr( struct _exception *e )
> >> {
> >> switch(e->type) {
> >>   case _DOMAIN:
> >>   case _SING:
> >> errno = set_errno(EDOM);
> >> break;
> >>   case _TLOSS:
> >>   case _OVERFLOW:
> >> errno = set_errno(ERANGE);
> >>   }
> >> return 0;
> >> }
> >> #endif
>
> >> Presumably, at some point in the evolution of Msys and/or MSVS, this
> >> definition was required. Perhaps it's no longer needed? I'm pretty sure
> >> I'm
> >> up-to-date for MSVS / Platform SDK / Msys --- all acquired within the
> >> last
> >> month, due to upgrading my home system.
>
> >> What do you folks see?
>
> >> Lou
>
> >> _______________________________________________
> >> OS mailing list
> >> O... at list.coin-or.org
> >>http://list.coin-or.org/mailman/listinfo/os
>
> > --
> > Kipp Martin
> > Professor of Operations Research
> > and Computing Technology
> > University of Chicago
> > Graduate School of Business
> > 5807 South Woodlawn Avenue
> > Chicago IL 60637
> > 773-702-7456
> >http://gsbkip.chicagogsb.edu
> >http://www.coin-or.org/
> > _______________________________________________
> > OS mailing list
> > O... at list.coin-or.org
> >http://list.coin-or.org/mailman/listinfo/os- Hide quoted text -
>
> - Show quoted text -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Optimization Services (OS)" group.
To post to this group, send email to optimizationservices at googlegroups.com
To unsubscribe from this group, send email to optimizationservices-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/optimizationservices?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the OS mailing list