<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html;charset=us-ascii'>
<style>BODY{font:10pt Tahoma, Verdana, sans-serif;}</style>
</head>
<body>
Folks,<br><br>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.<br><br>All,<br>
<br>
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):<br>
<br>
#if defined(MUMPS_WIN32)<br>
#define snprintf _snprintf<br>
#endif<br>
<br>
That's an easy fix.<br>
<br>
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. <br>
<br>
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.<br>
<br>
end<br><br>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.<br><br>Damien <br><blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"><hr><b>From:</b> Andreas Waechter [mailto:andreasw@watson.ibm.com]<br><b>To:</b> Stefan Vigerske [mailto:stefan@math.hu-berlin.de]<br><b>Cc:</b> ipopt mailing list [mailto:ipopt@list.coin-or.org]<br><b>Sent:</b> Fri, 19 Sep 2008 08:46:43 -0600<br><b>Subject:</b> Re: [Ipopt] Ipopt 3.5.2 release<br><br>Okokok :-))<br>
<br>
You are right, I should have tested it more before accepting that version <br>
of MUMPS. I had assumed that it contained only minor fixes.<br>
<br>
I'm create a new Ipopt release 3.5.3 now, which will be different from <br>
the 3.5.2 release only in that it draws in the Mumps externals that uses <br>
MUMPS 4.8.1...<br>
<br>
Sorry for all the confusion and hassle....<br>
<br>
Andreas<br>
<br>
On Fri, 19 Sep 2008, Stefan Vigerske wrote:<br>
<br>
> Hi,<br>
><br>
>> MUMPS 4.8.2 has some issues compiling on Windows.<br>
><br>
> Yes, I can verify this.<br>
><br>
>> The MUMPS devs posted to<br>
>> their list about Windows compilation and I have about half of it fixed. As soon<br>
>> as I have the fixes done (next day or two) I'll post the patches here.<br>
>> Hopefully I can make this simple.<br>
><br>
> I've changed ThirdParty/Mumps/stable/1.1 to use Mumps 4.8.1 again, and<br>
> made a new release ThirdParty/Mumps/stable/1.1.4 (actually I had liked<br>
> to delete the 1.1.3 release, but that would break Ipopt 3.5.2).<br>
><br>
> I have a quick patch for 4.8.2 that make it compiling on Windows/icl and<br>
> added it to Mumps/trunk. Looking forward for the "real" patch.<br>
><br>
> I would prefer to have Mumps/trunk with 4.8.2 tested a while before<br>
> updating stable/1.1 and making a release!<br>
><br>
> Best,<br>
> Stefan<br>
><br>
> -- <br>
> Stefan Vigerske<br>
> Humboldt University Berlin, Numerical Mathematics<br>
> <a href="http://www.math.hu-berlin.de/%7Estefan" target="_blank">http://www.math.hu-berlin.de/~stefan</a><br>
> _______________________________________________<br>
> Ipopt mailing list<br>
> <a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
> <a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
><br>
_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
</blockquote><style>
</style>
</body></html>