--- Ipopt-3.10.2/Ipopt/src/LinAlg/IpBlas.cpp	2010-12-21 22:34:47.000000000 +0100
+++ Ipopt-3.10.2-okk/Ipopt/src/LinAlg/IpBlas.cpp	2012-03-15 15:30:11.000000000 +0100
@@ -8,7 +8,7 @@
 
 #include "IpoptConfig.h"
 #include "IpBlas.hpp"
-
+#include <cassert> 
 // Prototypes for the BLAS routines
 extern "C"
 {
@@ -57,6 +57,7 @@
                              int transa_len, int diag_len);
 }
 
+
 namespace Ipopt
 {
 #ifndef HAVE_CBLAS
@@ -65,8 +66,13 @@
                     Index incY)
   {
     ipfint n=size, INCX=incX, INCY=incY;
-
-    return F77_FUNC(ddot,DDOT)(&n, x, &INCX, y, &INCY);
+    
+    Number s=0;
+    if( incX && incY ) s=   F77_FUNC(ddot,DDOT)(&n, x, &INCX, y, &INCY) ; 
+    else 
+      for (int i=0,ix=0,iy=0;  i<n;  ++i, ix += incX, iy += incY )
+	s += x[ix]*y[iy]; 
+     return s ;
   }
 
   /* Interface to FORTRAN routine DNRM2. */
@@ -81,7 +87,7 @@
   Number IpBlasDasum(Index size, const Number *x, Index incX)
   {
     ipfint n=size, INCX=incX;
-
+    assert(incX);  // FH 
     return F77_FUNC(dasum,DASUM)(&n, x, &INCX);
   }
 
@@ -89,7 +95,7 @@
   Index IpBlasIdamax(Index size, const Number *x, Index incX)
   {
     ipfint n=size, INCX=incX;
-
+    assert(incX);  // FH 
     return (Index) F77_FUNC(idamax,IDAMAX)(&n, x, &INCX);
   }
 
@@ -97,8 +103,17 @@
   void IpBlasDcopy(Index size, const Number *x, Index incX, Number *y, Index incY)
   {
     ipfint N=size, INCX=incX, INCY=incY;
-
-    F77_FUNC(dcopy,DCOPY)(&N, x, &INCX, y, &INCY);
+    if(incX)
+      F77_FUNC(dcopy,DCOPY)(&N, x, &INCX, y, &INCY);
+    else  // modif FH
+      if(incY==1)
+	{
+	  Number *ey = y + size;
+	  while (y <ey) *y++=*x;
+	}
+      else 
+	 for(Index i=0,ii=0; i<size;++i, ii+=incY)
+	  y[ii]=*x;
   }
 
   /* Interface to FORTRAN routine DAXPY. */
@@ -106,15 +121,25 @@
                    Index incY)
   {
     ipfint N=size, INCX=incX, INCY=incY;
-
-    F77_FUNC(daxpy,DAXPY)(&N, &alpha, x, &INCX, y, &INCY);
+    if(incX) 
+      F77_FUNC(daxpy,DAXPY)(&N, &alpha, x, &INCX, y, &INCY);
+    else  // modif FH                                 
+      if(incY==1)
+        {
+          Number *ey = y + size;
+          while (y <ey) 
+	    *y++ += *x * alpha;
+        }
+      else
+	for(Index i=0,ii=0; i<size;++i, ii+=incY)
+          y[ii] += *x * alpha;      
   }
 
   /* Interface to FORTRAN routine DSCAL. */
   void IpBlasDscal(Index size, Number alpha, Number *x, Index incX)
   {
     ipfint N=size, INCX=incX;
-
+    assert(incX);  // FH 
     F77_FUNC(dscal,DSCAL)(&N, &alpha, x, &INCX);
   }
 
@@ -123,7 +148,7 @@
                    Index incX, Number beta, Number* y, Index incY)
   {
     ipfint M=nCols, N=nRows, LDA=ldA, INCX=incX, INCY=incY;
-
+    assert(incX && incY);  // FH
     char TRANS;
     if (trans) {
       TRANS = 'T';
@@ -141,7 +166,7 @@
                    Index incY)
   {
     ipfint N=n, LDA=ldA, INCX=incX, INCY=incY;
-
+    assert(incX && incY);  // FH
     char UPLO='L';
 
     F77_FUNC(dsymv,DSYMV)(&UPLO, &N, &alpha, A, &LDA, x,
--- Ipopt-3.10.2/Ipopt/src/Algorithm/IpIpoptAlg.cpp	2011-06-11 11:23:59.000000000 -0500
+++ Ipopt-3.10.2-okk/Ipopt/src/Algorithm/IpIpoptAlg.cpp	2013-02-12 14:07:39.000000000 -0600
@@ -262,7 +262,7 @@
     }
 
     if (!isResto) {
-      Jnlst().Printf(J_ITERSUMMARY, J_MAIN, "This is Ipopt version "IPOPT_VERSION", running with linear solver %s.\n\n", linear_solver_.c_str());
+      Jnlst().Printf(J_ITERSUMMARY, J_MAIN, "This is Ipopt version " IPOPT_VERSION ", running with linear solver %s.\n\n", linear_solver_.c_str());
     }
 
     SolverReturn retval = UNASSIGNED;
