[Ipopt] Ipopt 3.5.2 release

Damien Hocking damien at khubla.com
Sat Sep 20 13:55:11 EDT 2008


Here's a copy of what I just sent to the MUMPS list.  MUMPS 4.8.2 uses C99 standard for its C files and this is the root cause of the problems.

  I've got MUMPS 4.8.2 built and running under Windows using Visual  Studio 8 for the C files and Intel Fortran.  I haven't tried with VS 9  yet.  There are two issues with compiling 4.8.2 using the Microsoft  compiler.  The first is an easy fix.  The snprintf is _snprintf on the  Windows platform.  All you need is this at the top of any file that  uses snprintf (e.g. mumps_io_err.c):
  #if defined(MUMPS_WIN32)
  #define snprintf _snprintf
  That's an easy fix.
  The second problem is more difficult.  Visual Studio 8 complies with  the C89 standard and some parts of C99.  Unfortunately it's missing a  key part of C99, which is allowing variable declarations at any point  in a function.  C89 says that all variable declarations must be at the  start of any function.  The Intel compiler has a /C99 switch and  shouldn't be affected by this.  There's two solutions for the MS  compiler.  The first is a hack:  Add the /TP flag to the compiler to  tell it to compile all the C files as C++, which allows variable  declarations anywhere.  Then you run into C++ name mangling where the  Fortran tries to call non-mangled C function names which it can't find  and then the linker complains.  The solution to that is to wrap all the  C function declarations in " extern "C" " to switch off name mangling.   This is a lot of extra work for the MUMPS devs for one compiler.  I did  this and got it to work, but I should have used the second solution,  below.  I need to try with Visual Studio 9 as well to see if that has  the same problem. 
  The second solution that's not a hack involves changing the files like  mumps_io.c so that all the variable declarations are at the start of  each function so they're C89 compliant and the problem should go away.   I'll try this over the next couple of days to make sure it works and  you're welcome to the code.  That's probably the most straightforward  fix.

Once I've tested out the conversion back to C89 standard and proven it works, I can post the modified MUMPS files here (shouldn't be too many) if people *really* want to use MUMPS 4.8.2.  I suspect the MUMPS devs will put a 4.8.3 patch up once we get this sorted out and tested.


From: Andreas Waechter [mailto:andreasw at watson.ibm.com]
To: Stefan Vigerske [mailto:stefan at math.hu-berlin.de]
Cc: ipopt mailing list [mailto:ipopt at list.coin-or.org]
Sent: Fri, 19 Sep 2008 08:46:43 -0600
Subject: Re: [Ipopt] Ipopt 3.5.2 release

Okokok :-))
  You are right, I should have tested it more before accepting that version 
  of MUMPS.  I had assumed that it contained only minor fixes.
  I'm create a new Ipopt release 3.5.3 now, which will be different from 
  the 3.5.2 release only in that it draws in the Mumps externals that uses 
  MUMPS 4.8.1...
  Sorry for all the confusion and hassle....
  On Fri, 19 Sep 2008, Stefan Vigerske wrote:
  > Hi,
  >> MUMPS 4.8.2 has some issues compiling on Windows.
  > Yes, I can verify this.
  >>  The MUMPS devs posted to
  >> their list about Windows compilation and I have about half of it fixed.  As soon
  >> as I have the fixes done (next day or two) I'll post the patches here.
  >> Hopefully I can make this simple.
  > I've changed ThirdParty/Mumps/stable/1.1 to use Mumps 4.8.1 again, and
  > made a new release ThirdParty/Mumps/stable/1.1.4 (actually I had liked
  > to delete the 1.1.3 release, but that would break Ipopt 3.5.2).
  > I have a quick patch for 4.8.2 that make it compiling on Windows/icl and
  > added it to Mumps/trunk. Looking forward for the "real" patch.
  > I would prefer to have Mumps/trunk with 4.8.2 tested a while before
  > updating stable/1.1 and making a release!
  > Best,
  > Stefan
  > -- 
  > Stefan Vigerske
  > Humboldt University Berlin, Numerical Mathematics
  > http://www.math.hu-berlin.de/~stefan
  > _______________________________________________
  > Ipopt mailing list
  > Ipopt at list.coin-or.org
  > http://list.coin-or.org/mailman/listinfo/ipopt
  Ipopt mailing list
  Ipopt at list.coin-or.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20080920/fe5b020d/attachment.html 

More information about the Ipopt mailing list