Changeset 555


Ignore:
Timestamp:
Oct 28, 2005 4:32:05 PM (14 years ago)
Author:
andreasw
Message:
  • integrated MA57 Interface into build system
  • minor changes in Ma57TSolverInterface code
Location:
branches/dev
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/Algorithm/IpAlgBuilder.cpp

    r546 r555  
    3535# include "IpMa27TSolverInterface.hpp"
    3636#endif
     37#ifdef HAVE_MA57
     38# include "IpMa57TSolverInterface.hpp"
     39#endif
    3740#ifdef HAVE_MC19
    3841# include "IpMc19TSymScalingMethod.hpp"
     
    5457  {
    5558    roptions->SetRegisteringCategory("Undocumented");
    56     roptions->AddStringOption3(
     59    roptions->AddStringOption4(
    5760      "linear_solver",
    5861      "Linear solver used for step computations.",
    5962      "ma27",
    6063      "ma27", "use the Harwell routine MA27",
     64      "ma57", "use the Harwell routine MA57",
    6165      "pardiso", "use the Pardiso package",
    6266      "taucs", "use TAUCS package",
     
    150154
    151155    }
     156    else if (linear_solver=="ma57") {
     157#ifdef HAVE_MA57
     158      SolverInterface = new Ma57TSolverInterface();
     159#else
     160
     161      THROW_EXCEPTION(OPTION_INVALID,
     162                      "Selected linear solver MA57 not available.");
     163#endif
     164
     165    }
    152166    else if (linear_solver=="pardiso") {
    153167#ifdef HAVE_PARDISO
  • branches/dev/Algorithm/LinearSolvers/IpLinearSolversRegOp.cpp

    r507 r555  
    1313# include "IpMa27TSolverInterface.hpp"
    1414#endif
     15#ifdef HAVE_MA57
     16# include "IpMa57TSolverInterface.hpp"
     17#endif
     18#ifdef HAVE_PARDISO
     19# include "IpPardisoSolverInterface.hpp"
     20#endif
    1521
    1622namespace Ipopt
     
    1925  void RegisterOptions_LinearSolvers(const SmartPtr<RegisteredOptions>& roptions)
    2026  {
     27#ifdef HAVE_MA27
     28    \
    2129    roptions->SetRegisteringCategory("MA27 Linear Solver");
    22 #ifdef HAVE_MA27
     30    Ma27TSolverInterface::RegisterOptions(roptions);
     31#endif
    2332
    24     Ma27TSolverInterface::RegisterOptions(roptions);
     33#ifdef HAVE_MA57
     34
     35    roptions->SetRegisteringCategory("MA57 Linear Solver");
     36    Ma57TSolverInterface::RegisterOptions(roptions);
     37#endif
     38
     39#ifdef HAVE_PARDISO
     40
     41    PardisoSolverInterface::RegisterOptions(roptions);
     42    roptions->SetRegisteringCategory("Pardiso Linear Solver");
    2543#endif
    2644
  • branches/dev/Algorithm/LinearSolvers/IpMa27TSolverInterface.cpp

    r532 r555  
    7676  {
    7777    roptions->AddBoundedNumberOption(
    78       "pivtol",
     78      "ma27_pivtol",
    7979      "Pivot tolerance for the linear solver MA27.",
    8080      0.0, true, 1.0, true, 1e-8,
     
    8282      "a larger number pivots for stability.");
    8383    roptions->AddBoundedNumberOption(
    84       "pivtolmax",
    85       "Maximum pivot tolerance.",
     84      "ma27_pivtolmax",
     85      "Maximum pivot tolerance for the linear solver MA27.",
    8686      0.0, true, 1.0, true, 1e-4,
    8787      "Ipopt may increase pivtol as high as pivtolmax "
    8888      "to get a more accurate solution to the linear system.");
    8989    roptions->AddLowerBoundedNumberOption(
    90       "liw_init_factor",
     90      "ma27_liw_init_factor",
    9191      "Integer workspace memory for MA27.",
    9292      1.0, false, 5.0,
     
    9595      "size by meminc_factor if required.");
    9696    roptions->AddLowerBoundedNumberOption(
    97       "la_init_factor",
     97      "ma27_la_init_factor",
    9898      "Real workspace memory for MA27.",
    9999      1.0, false, 5.0,
     
    102102      " size by meminc_factor if required.");
    103103    roptions->AddLowerBoundedNumberOption(
    104       "meminc_factor",
     104      "ma27_meminc_factor",
    105105      "Increment factor for workspace size for MA27.",
    106106      1.0, false, 10.0,
     
    112112      const std::string& prefix)
    113113  {
    114     options.GetNumericValue("pivtol", pivtol_, prefix);
    115     if(options.GetNumericValue("pivtolmax", pivtolmax_, prefix)) {
     114    options.GetNumericValue("ma27_pivtol", pivtol_, prefix);
     115    if(options.GetNumericValue("ma27_pivtolmax", pivtolmax_, prefix)) {
    116116      ASSERT_EXCEPTION(pivtolmax_>=pivtol_, OPTION_INVALID,
    117117                       "Option \"pivtolmax\": This value must be between "
     
    122122    }
    123123
    124     options.GetNumericValue("liw_init_factor", liw_init_factor_, prefix);
    125     options.GetNumericValue("la_init_factor", la_init_factor_, prefix);
    126     options.GetNumericValue("meminc_factor", meminc_factor_, prefix);
     124    options.GetNumericValue("ma27_liw_init_factor", liw_init_factor_, prefix);
     125    options.GetNumericValue("ma27_la_init_factor", la_init_factor_, prefix);
     126    options.GetNumericValue("ma27_meminc_factor", meminc_factor_, prefix);
    127127    // The following option is registered by OrigIpoptNLP
    128128    options.GetBoolValue("warm_start_same_structure",
     
    493493
    494494    Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    495                    "Indreasing pivot tolerance from %7.2e ",
     495                   "Indreasing pivot tolerance  for MA27 from %7.2e ",
    496496                   pivtol_);
    497497    pivtol_ = Min(pivtolmax_, pow(pivtol_,0.75));
  • branches/dev/Algorithm/LinearSolvers/IpMa57TSolverInterface.cpp

    r554 r555  
    1 // Copyright (C) 2004, 2005 International Business Machines and others.
     1// Copyright (C) 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    3030   */
    3131  extern void  F77_FUNC (ma57id, MA57ID) (
    32     double      *cntl,
    33     int         *icntl);
     32      double    *cntl,
     33      ipfint    *icntl);
    3434
    3535  /*
     
    3737   */
    3838  extern void  F77_FUNC (ma57ad, MA57AD) (
    39     int         *n,             /* Order of matrix. */
    40     int         *ne,            /* Number of entries. */
    41 
    42     const Ipopt::Index  *irn,   /* Matrix nonzero row structure */
    43     const Ipopt::Index  *jcn,   /* Matrix nonzero column structure */
    44 
    45     int         *lkeep,         /* Workspace for the pivot order of lenght 3*n */
    46     int         *keep,          /* Workspace for the pivot order of lenght 3*n */
    47                                 /* Automatically iflag = 0; ikeep pivot order iflag = 1 */
    48     int         *iwork,         /* Integer work space. */
    49     int         *icntl,         /* Integer Control parameter of length 30*/
    50     int         *info,          /* Statistical Information; Integer array of length 20 */
    51     double      *rinfo);        /* Double Control parameter of length 5 */
     39      ipfint    *n,     /* Order of matrix. */
     40      ipfint    *ne,            /* Number of entries. */
     41
     42      const ipfint    *irn,       /* Matrix nonzero row structure */
     43      const ipfint    *jcn,       /* Matrix nonzero column structure */
     44
     45      ipfint    *lkeep,     /* Workspace for the pivot order of lenght 3*n */
     46      ipfint    *keep,      /* Workspace for the pivot order of lenght 3*n */
     47      /* Automatically iflag = 0; ikeep pivot order iflag = 1 */
     48      ipfint    *iwork,     /* Integer work space. */
     49      ipfint    *icntl,     /* Integer Control parameter of length 30*/
     50      ipfint    *info,      /* Statistical Information; Integer array of length 20 */
     51      double    *rinfo);    /* Double Control parameter of length 5 */
    5252
    5353  /*
     
    5555   */
    5656  extern void  F77_FUNC (ma57bd, MA57BD) (
    57     int         *n,             /* Order of matrix. */
    58     int         *ne,            /* Number of entries. */
    59 
    60     double      *a,             /* Numerical values. */
    61     double      *fact,          /* Entries of factors. */
    62     int         *lfact,         /* Length of array `fact'. */
    63     int         *ifact,         /* Indexing info for factors. */
    64     int         *lifact,        /* Length of array `ifact'. */
    65 
    66     int         *lkeep,         /* Length of array `keep'. */
    67     int         *keep,          /* Integer array. */
    68 
    69     int         *iwork,         /* Workspace of length `n'. */
    70 
    71     int         *icntl,         /* Integer Control parameter of length 20. */
    72     double      *cntl,          /* Double Control parameter of length 5. */
    73     int         *info,          /* Statistical Information; Integer array of length 40. */
    74     double      *rinfo);        /* Statistical Information; Real array of length 20. */
     57      ipfint    *n,     /* Order of matrix. */
     58      ipfint    *ne,            /* Number of entries. */
     59
     60      double    *a,     /* Numerical values. */
     61      double    *fact,      /* Entries of factors. */
     62      ipfint    *lfact,     /* Length of array `fact'. */
     63      ipfint    *ifact,     /* Indexing info for factors. */
     64      ipfint    *lifact,    /* Length of array `ifact'. */
     65
     66      ipfint    *lkeep,     /* Length of array `keep'. */
     67      ipfint    *keep,      /* Integer array. */
     68
     69      ipfint    *iwork,     /* Workspace of length `n'. */
     70
     71      ipfint    *icntl,     /* Integer Control parameter of length 20. */
     72      double    *cntl,      /* Double Control parameter of length 5. */
     73      ipfint    *info,      /* Statistical Information; Integer array of length 40. */
     74      double    *rinfo);    /* Statistical Information; Real array of length 20. */
    7575
    7676  /*
     
    7878   */
    7979  extern void  F77_FUNC (ma57cd, MA57CD) (
    80     int         *job,           /* Solution job.  Solve for...
    81                                    JOB <= 1:  A
    82                                    JOB == 2:  PLP^t
    83                                    JOB == 3:  PDP^t
    84                                    JOB >= 4:  PL^t P^t */
    85 
    86     int         *n,             /* Order of matrix. */
    87 
    88     double      *fact,          /* Entries of factors. */
    89     int         *lfact,         /* Length of array `fact'. */
    90     int         *ifact,         /* Indexing info for factors. */
    91     int         *lifact,        /* Length of array `ifact'. */
    92 
    93     int         *nrhs,          /* Number of right hand sides. */
    94     double      *rhs,           /* Numerical Values. */
    95     int         *lrhs,          /* Leading dimensions of `rhs'. */
    96 
    97     double      *work,          /* Real workspace. */
    98     int         *lwork,         /* Length of `work', >= N*NRHS. */
    99     int         *iwork,         /* Integer array of length `n'. */
    100 
    101     int         *icntl,         /* Integer Control parameter array of length 20. */
    102     int         *info);         /* Statistical Information; Integer array of length 40. */
     80      ipfint    *job,       /* Solution job.  Solve for...
     81                                                 JOB <= 1:  A
     82                                                 JOB == 2:  PLP^t
     83                                                 JOB == 3:  PDP^t
     84                                                 JOB >= 4:  PL^t P^t */
     85
     86      ipfint    *n,     /* Order of matrix. */
     87
     88      double    *fact,      /* Entries of factors. */
     89      ipfint    *lfact,     /* Length of array `fact'. */
     90      ipfint    *ifact,     /* Indexing info for factors. */
     91      ipfint    *lifact,    /* Length of array `ifact'. */
     92
     93      ipfint    *nrhs,      /* Number of right hand sides. */
     94      double    *rhs,       /* Numerical Values. */
     95      ipfint    *lrhs,      /* Leading dimensions of `rhs'. */
     96
     97      double    *work,      /* Real workspace. */
     98      ipfint    *lwork,     /* Length of `work', >= N*NRHS. */
     99      ipfint    *iwork,     /* Integer array of length `n'. */
     100
     101      ipfint    *icntl,     /* Integer Control parameter array of length 20. */
     102      ipfint    *info);     /* Statistical Information; Integer array of length 40. */
    103103
    104104  /*
     
    106106   */
    107107  extern void  F77_FUNC (ma57ed, MA57ED) (
    108     int         *n,
    109     int         *ic,            /* 0: copy real array.  >=1:  copy integer array. */
    110     int         *keep,
    111 
    112     double      *fact,
    113     int         *lfact,
    114     double      *newfac,
    115     int         *lnew,
    116 
    117     int         *ifact,
    118     int         *lifact,
    119     int         *newifc,
    120     int         *linew,
    121 
    122     int         *info);
     108      ipfint    *n,
     109      ipfint    *ic,        /* 0: copy real array.  >=1:  copy integer array. */
     110      ipfint    *keep,
     111
     112      double    *fact,
     113      ipfint    *lfact,
     114      double    *newfac,
     115      ipfint    *lnew,
     116
     117      ipfint    *ifact,
     118      ipfint    *lifact,
     119      ipfint    *newifc,
     120      ipfint    *linew,
     121
     122      ipfint    *info);
    123123}
    124124
     
    130130
    131131  std::string ma57_err_msg[] = {
    132     "Operation successful.\n",
    133 
    134     "Value of N is out of range on a call to MA57A/AD, MA57B/BD, MA57C/CD, or\n"
    135     "MA57D/DD. Value given is held in INFO(2).\n",
    136 
    137     "Value of NE is out of range on a call to MA57A/AD, MA57B/BD, or\n"
    138     "MA57D/DD. Value given is held in INFO(2).\n",
    139 
    140     "Failure due to insufficient REAL space on a call to MA57B/BD. INFO(17)\n"
    141     "is set to a value that may suffice. INFO(2) is set to value of\n"
    142     "LFACT. The user can allocate a larger array and copy the contents of\n"
    143     "FACT into it using MA57E/ED, and recall MA57B/BD.\n",
    144 
    145     "Failure due to insufficient INTEGER space on a call to\n"
    146     "MA57B/BD. INFO(18) is set to a value that may suffice. INFO(2) is set to\n"
    147     "value of LIFACT. The user can allocate a larger array and copy the\n"
    148     "contents of IFACT into it using MA57E/ED, and recall MA57B/BD.\n",
    149 
    150     "A pivot with magnitude less than or equal to CNTL(2) was found at pivot\n"
    151     "step INFO(2) when calling MA57B/BD with ICNTL(7) = 2 or 3, or the\n"
    152     "correction obtained when using matrix modification does not give a pivot\n"
    153     "greater than CNTL(2) when ICNTL(7) = 4.\n",
    154 
    155     "A change of sign of pivots has been detected when ICNTL(7) = 2. INFO(2)\n"
    156     "is set to the pivot step at which the change was detected on a call to\n"
    157     "MA57B/BD.\n",
    158 
    159     "Either LNEW < LFACT or LINEW < LIFACT on a call to MA57E/ED. INFO(2) is\n"
    160     "set to LNEW or LINEW as appropriate.\n",
    161 
    162     "Iterative refinement fails to converge in specified number of iterations\n"
    163     "on a call to MA57D/DD.\n",
    164 
    165     "Error in permutation array when ICNTL(6)=1 on a call to\n"
    166     "MA57A/AD. INFO(2) holds first component at which error was detected.\n",
    167 
    168     "Value of ICNTL(7) out of range on a call to MA57B/BD. Value given held\n"
    169     "in INFO(2).\n",
    170 
    171     "LRHS < N on a call to MA57C/CD. INFO(2) holds value of LRHS.\n",
    172 
    173     "Invalid value for JOB on a call to MA57D/DD. Value given held in\n"
    174     "INFO(2).\n",
    175 
    176     "Invalid value of ICNTL(9) on a call to MA57D/DD. Value given held in\n"
    177     "INFO(2).\n",
    178 
    179     "Failure of MC71A/AD on a call to MA57D/DD with ICNTL(10)> 0.\n",
    180 
    181     "LKEEP less than 5*N+NE+MAX(N,NE) +42 on a call to MA57A/AD or\n"
    182     "MA57B/BD. INFO(2) holds value of LKEEP.\n",
    183 
    184     "NRHS less than 1 on call to MA57C/CD. INFO(2) holds value of NRHS.\n",
    185 
    186     "LWORK too small on entry to MA57C/CD. INFO(2) holds minimum length\n"
    187     "required. A positive value of INFO(1) is associated with a warning\n"
    188     "message that will be output on unit ICNTL(2).\n"
    189   };
     132                                 "Operation successful.\n",
     133
     134                                 "Value of N is out of range on a call to MA57A/AD, MA57B/BD, MA57C/CD, or\n"
     135                                 "MA57D/DD. Value given is held in INFO(2).\n",
     136
     137                                 "Value of NE is out of range on a call to MA57A/AD, MA57B/BD, or\n"
     138                                 "MA57D/DD. Value given is held in INFO(2).\n",
     139
     140                                 "Failure due to insufficient REAL space on a call to MA57B/BD. INFO(17)\n"
     141                                 "is set to a value that may suffice. INFO(2) is set to value of\n"
     142                                 "LFACT. The user can allocate a larger array and copy the contents of\n"
     143                                 "FACT into it using MA57E/ED, and recall MA57B/BD.\n",
     144
     145                                 "Failure due to insufficient INTEGER space on a call to\n"
     146                                 "MA57B/BD. INFO(18) is set to a value that may suffice. INFO(2) is set to\n"
     147                                 "value of LIFACT. The user can allocate a larger array and copy the\n"
     148                                 "contents of IFACT into it using MA57E/ED, and recall MA57B/BD.\n",
     149
     150                                 "A pivot with magnitude less than or equal to CNTL(2) was found at pivot\n"
     151                                 "step INFO(2) when calling MA57B/BD with ICNTL(7) = 2 or 3, or the\n"
     152                                 "correction obtained when using matrix modification does not give a pivot\n"
     153                                 "greater than CNTL(2) when ICNTL(7) = 4.\n",
     154
     155                                 "A change of sign of pivots has been detected when ICNTL(7) = 2. INFO(2)\n"
     156                                 "is set to the pivot step at which the change was detected on a call to\n"
     157                                 "MA57B/BD.\n",
     158
     159                                 "Either LNEW < LFACT or LINEW < LIFACT on a call to MA57E/ED. INFO(2) is\n"
     160                                 "set to LNEW or LINEW as appropriate.\n",
     161
     162                                 "Iterative refinement fails to converge in specified number of iterations\n"
     163                                 "on a call to MA57D/DD.\n",
     164
     165                                 "Error in permutation array when ICNTL(6)=1 on a call to\n"
     166                                 "MA57A/AD. INFO(2) holds first component at which error was detected.\n",
     167
     168                                 "Value of ICNTL(7) out of range on a call to MA57B/BD. Value given held\n"
     169                                 "in INFO(2).\n",
     170
     171                                 "LRHS < N on a call to MA57C/CD. INFO(2) holds value of LRHS.\n",
     172
     173                                 "Invalid value for JOB on a call to MA57D/DD. Value given held in\n"
     174                                 "INFO(2).\n",
     175
     176                                 "Invalid value of ICNTL(9) on a call to MA57D/DD. Value given held in\n"
     177                                 "INFO(2).\n",
     178
     179                                 "Failure of MC71A/AD on a call to MA57D/DD with ICNTL(10)> 0.\n",
     180
     181                                 "LKEEP less than 5*N+NE+MAX(N,NE) +42 on a call to MA57A/AD or\n"
     182                                 "MA57B/BD. INFO(2) holds value of LKEEP.\n",
     183
     184                                 "NRHS less than 1 on call to MA57C/CD. INFO(2) holds value of NRHS.\n",
     185
     186                                 "LWORK too small on entry to MA57C/CD. INFO(2) holds minimum length\n"
     187                                 "required. A positive value of INFO(1) is associated with a warning\n"
     188                                 "message that will be output on unit ICNTL(2).\n"
     189                               };
    190190
    191191  std::string ma57_wrn_msg[] = {
    192     "Operation successful.\n",
    193 
    194     "Index (in IRN or JCN) out of range on call to MA57A/AD or\n"
    195     "MA57D/DD. Action taken by subroutine is to ignore any such entries and\n"
    196     "continue. INFO(3) is set to the number of faulty entries. Details of the\n"
    197     "first ten are printed on unit ICNTL(2).\n",
    198 
    199     "Duplicate indices on call to MA57A/AD or MA57D/DD. Action taken by\n"
    200     "subroutine is to keep the duplicates and then to sum corresponding reals\n"
    201     "when MA57B/BD is called. INFO(4) is set to the number of faulty\n"
    202     "entries. Details of the first ten are printed on unit ICNTL(2).\n",
    203 
    204     "Both out-of-range indices and duplicates exist.\n",
    205 
    206     "Matrix is rank deficient on exit from MA57B/BD. In this case, a\n"
    207     "decomposition will still have been produced that will enable the\n"
    208     "subsequent solution of consistent equations. INFO(25) will be set to the\n"
    209     "rank of the factorized matrix.\n",
    210 
    211     "Pivots have different signs when factorizing a supposedly definite\n"
    212     "matrix (ICNTL(7) = 3) on call to MA57B/BD. INFO(26) is set to the number\n"
    213     "of sign changes.\n",
    214 
    215     "-",
    216     "-",
    217 
    218     "During error analysis the infinity norm of the computed solution was\n"
    219     "found to be zero.\n",
    220 
    221     "Insufficient real space to complete factorization when MA57B/BD called\n"
    222     "with ICNTL(8) != 0. User can copy real values to a longer array using\n"
    223     "MA57E/ED and recall MA57B/BD using this longer array to continue the\n"
    224     "factorization.\n",
    225 
    226     "Insufficient integer space to complete factorization when MA57B/BD\n"
    227     "called with ICNTL(8) != 0. User can copy integer values to a longer\n"
    228     "array using MA57E/ED and recall MA57B/BD using this longer array to\n"
    229     "continue the factorization.\n"
    230   };
     192                                 "Operation successful.\n",
     193
     194                                 "Index (in IRN or JCN) out of range on call to MA57A/AD or\n"
     195                                 "MA57D/DD. Action taken by subroutine is to ignore any such entries and\n"
     196                                 "continue. INFO(3) is set to the number of faulty entries. Details of the\n"
     197                                 "first ten are printed on unit ICNTL(2).\n",
     198
     199                                 "Duplicate indices on call to MA57A/AD or MA57D/DD. Action taken by\n"
     200                                 "subroutine is to keep the duplicates and then to sum corresponding reals\n"
     201                                 "when MA57B/BD is called. INFO(4) is set to the number of faulty\n"
     202                                 "entries. Details of the first ten are printed on unit ICNTL(2).\n",
     203
     204                                 "Both out-of-range indices and duplicates exist.\n",
     205
     206                                 "Matrix is rank deficient on exit from MA57B/BD. In this case, a\n"
     207                                 "decomposition will still have been produced that will enable the\n"
     208                                 "subsequent solution of consistent equations. INFO(25) will be set to the\n"
     209                                 "rank of the factorized matrix.\n",
     210
     211                                 "Pivots have different signs when factorizing a supposedly definite\n"
     212                                 "matrix (ICNTL(7) = 3) on call to MA57B/BD. INFO(26) is set to the number\n"
     213                                 "of sign changes.\n",
     214
     215                                 "-",
     216                                 "-",
     217
     218                                 "During error analysis the infinity norm of the computed solution was\n"
     219                                 "found to be zero.\n",
     220
     221                                 "Insufficient real space to complete factorization when MA57B/BD called\n"
     222                                 "with ICNTL(8) != 0. User can copy real values to a longer array using\n"
     223                                 "MA57E/ED and recall MA57B/BD using this longer array to continue the\n"
     224                                 "factorization.\n",
     225
     226                                 "Insufficient integer space to complete factorization when MA57B/BD\n"
     227                                 "called with ICNTL(8) != 0. User can copy integer values to a longer\n"
     228                                 "array using MA57E/ED and recall MA57B/BD using this longer array to\n"
     229                                 "continue the factorization.\n"
     230                               };
    231231
    232232  Ma57TSolverInterface::Ma57TSolverInterface()
    233     :
    234     dim_(0),
    235     nonzeros_(0),
    236     initialized_(false),
    237     pivtol_changed_(false),
    238     refactorize_(false),
    239 
    240     pivtol_(0.01),
    241     warm_start_same_structure_(false),
    242     wd_fact(NULL),
    243     wd_ifact(NULL),
    244     a_(NULL),
    245 
    246     la_increase_(false)
     233      :
     234      dim_(0),
     235      nonzeros_(0),
     236      initialized_(false),
     237      pivtol_changed_(false),
     238      refactorize_(false),
     239
     240      pivtol_(0.01),
     241      warm_start_same_structure_(false),
     242      wd_keep_(NULL),
     243      wd_iwork_(NULL),
     244      wd_fact_(NULL),
     245      wd_ifact_(NULL),
     246      a_(NULL)
    247247  {
    248248    DBG_START_METH("Ma57TSolverInterface::Ma57TSolverInterface()",
    249                    dbg_verbosity);
     249                   dbg_verbosity);
    250250  }
    251251
     
    256256    delete [] a_;
    257257
    258     delete [] wd_fact;
    259     delete [] wd_ifact;
    260 
    261     delete [] wd_iwork;
    262     delete [] wd_keep;
     258    delete [] wd_fact_;
     259    delete [] wd_ifact_;
     260
     261    delete [] wd_iwork_;
     262    delete [] wd_keep_;
    263263  }
    264264
    265265  void Ma57TSolverInterface::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
    266266  {
    267   }
    268 
    269   bool Ma57TSolverInterface::InitializeImpl(const OptionsList&  options,
    270                                             const std::string&  prefix)
    271   {
     267    roptions->AddBoundedNumberOption(
     268      "ma57_pivtol",
     269      "Pivot tolerance for the linear solver MA57.",
     270      0.0, true, 1.0, true, 1e-8,
     271      "A smaller number pivots for sparsity, "
     272      "a larger number pivots for stability.");
     273    roptions->AddBoundedNumberOption(
     274      "ma57_pivtolmax",
     275      "Maximum pivot tolerance for the linear solver MA57.",
     276      0.0, true, 1.0, true, 1e-4,
     277      "Ipopt may increase pivtol as high as pivtolmax "
     278      "to get a more accurate solution to the linear system.");
     279    roptions->AddLowerBoundedNumberOption(
     280      "ma57_pre_alloc",
     281      "Safety factor for work space memory allocation for the linear solver MA57.",
     282      1., false, 3.,
     283      "If 1 is chosen, the suggested amount of work space is used.  However, "
     284      "choosen a larger number might avoid reallocation if the suggest values "
     285      "do not suffice.");
     286  }
     287
     288  bool Ma57TSolverInterface::InitializeImpl(const OptionsList&  options,
     289      const std::string&    prefix)
     290  {
     291    // Obtain the options settings
     292    options.GetNumericValue("ma57_pivtol", pivtol_, prefix);
     293    if(options.GetNumericValue("ma57_pivtolmax", pivtolmax_, prefix)) {
     294      ASSERT_EXCEPTION(pivtolmax_>=pivtol_, OPTION_INVALID,
     295                       "Option \"pivtolmax\": This value must be between "
     296                       "pivtol and 1.");
     297    }
     298    else {
     299      pivtolmax_ = Max(pivtolmax_, pivtol_);
     300    }
     301
     302    options.GetNumericValue("ma57_pre_alloc", ma57_pre_alloc_, prefix);
     303
     304    // The following option is registered by OrigIpoptNLP
     305    options.GetBoolValue("warm_start_same_structure",
     306                         warm_start_same_structure_, prefix);
     307    DBG_ASSERT(!warm_start_same_structure_ && "warm_start_same_structure not yet implemented");
     308
     309
    272310    /* Initialize. */
    273     F77_FUNC (ma57id, MA57ID) (wd_cntl, wd_icntl);
     311    F77_FUNC (ma57id, MA57ID) (wd_cntl_, wd_icntl_);
    274312
    275313    /* Custom settings for MA57. */
    276     wd_icntl[1-1] = 0;          /* Error stream */
    277     wd_icntl[2-1] = 0;          /* Warning stream. */
    278 
    279     wd_icntl[4-1] = 1;          /* Print statistics.  NOT Used. */
    280     wd_icntl[5-1] = 0;          /* Print error. */
    281 
    282     // wd_icntl[6-1] = 0;               /* Pivoting order. */
    283 
    284     wd_cntl[1-1]  = pivtol_;    /* Pivot threshold. */
    285     wd_icntl[7-1] = 1;          /* Pivoting strategy. */
    286 
    287     // wd_icntl[8-1] = 0;               /* Retry factorization. */
     314    wd_icntl_[1-1] = 0;      /* Error stream */
     315    wd_icntl_[2-1] = 0;      /* Warning stream. */
     316
     317    wd_icntl_[4-1] = 1;      /* Print statistics.  NOT Used. */
     318    wd_icntl_[5-1] = 0;      /* Print error. */
     319
     320    // wd_icntl[6-1] = 0;       /* Pivoting order. */
     321
     322    wd_cntl_[1-1]  = pivtol_;    /* Pivot threshold. */
     323    wd_icntl_[7-1] = 1;      /* Pivoting strategy. */
     324
     325    // wd_icntl[8-1] = 0;       /* Retry factorization. */
    288326
    289327    if (!warm_start_same_structure_) {
    290328      dim_=0;
    291329      nonzeros_=0;
     330      delete [] a_;
     331      delete [] wd_fact_;
     332      delete [] wd_ifact_;
     333      delete [] wd_iwork_;
     334      delete [] wd_keep_;
    292335    }
    293336    else {
    294337      ASSERT_EXCEPTION(dim_>0 && nonzeros_>0, INVALID_WARMSTART,
    295338                       "Ma57TSolverInterface called with warm_start_same_structure, "
    296                        "but the problem is solved for the first time.");
     339                       "but the problem is solved for the first time.");
    297340    }
    298341
     
    301344
    302345  ESymSolverStatus
    303   Ma57TSolverInterface::MultiSolve(bool                 new_matrix,
    304                                    const Index*         airn,
    305                                    const Index*         ajcn,
    306                                    Index                nrhs,
    307                                    double*              rhs_vals,
    308                                    bool                 check_NegEVals,
    309                                    Index                numberOfNegEVals)
     346  Ma57TSolverInterface::MultiSolve(bool         new_matrix,
     347                                   const Index*     airn,
     348                                   const Index*     ajcn,
     349                                   Index        nrhs,
     350                                   double*      rhs_vals,
     351                                   bool         check_NegEVals,
     352                                   Index        numberOfNegEVals)
    310353  {
    311354    DBG_START_METH("Ma57TSolverInterface::MultiSolve",dbg_verbosity);
     
    350393    DBG_ASSERT(initialized_);
    351394
    352     // If the size of a is to be increase for the next factorization
    353     // anyway, delete the current large array and just return enough
    354     // to store the values
    355 
    356     if (la_increase_) {
    357       delete [] a_;
    358       a_ = new double [nonzeros_];
    359     }
    360 
    361395    return a_;
    362396  }
     
    365399      elements */
    366400  ESymSolverStatus
    367   Ma57TSolverInterface::InitializeStructure(Index               dim,
    368                                             Index               nonzeros,
    369                                             const Index*        airn,
    370                                             const Index*        ajcn)
     401  Ma57TSolverInterface::InitializeStructure(
     402    Index       dim,
     403    Index     nonzeros,
     404    const Index*  airn,
     405    const Index*  ajcn)
    371406  {
    372407    DBG_START_METH("Ma57TSolverInterface::InitializeStructure",dbg_verbosity);
     
    376411      dim_ = dim;
    377412      nonzeros_ = nonzeros;
     413      // for MA57, a_ only has to be as long as the number of nonzero
     414      // elements
     415      delete [] a_;
     416      a_ = new double [nonzeros_];
    378417
    379418      // Do the symbolic facotrization
     
    386425      ASSERT_EXCEPTION(dim_==dim && nonzeros_==nonzeros, INVALID_WARMSTART,
    387426                       "Ma57TSolverInterface called with warm_start_same_structure, "
    388                        "but the problem size has changed.");
     427                       "but the problem size has changed.");
    389428    }
    390429
     
    395434
    396435  ESymSolverStatus
    397   Ma57TSolverInterface::SymbolicFactorization(const Index*      airn,
    398                                               const Index*      ajcn)
     436  Ma57TSolverInterface::SymbolicFactorization(const Index*  airn,
     437      const Index*  ajcn)
    399438  {
    400439    DBG_START_METH("Ma57TSolverInterface::SymbolicFactorization",dbg_verbosity);
     
    404443    ipfint ne = nonzeros_;
    405444
    406     wd_lkeep = 5*n + ne + Max (n,ne) + 42;
    407 
    408     wd_iwork = new int[5*n];
    409     wd_keep  = new int[wd_lkeep];
     445    wd_lkeep_ = 5*n + ne + Max (n,ne) + 42;
     446
     447    wd_iwork_ = new ipfint[5*n];
     448    wd_keep_  = new ipfint[wd_lkeep_];
    410449
    411450    F77_FUNC (ma57ad, MA57AD)
    412       (&n, &ne, airn, ajcn, &wd_lkeep, wd_keep, wd_iwork,
    413        wd_icntl, wd_info, wd_rinfo);
    414 
    415     if (wd_info[0] < 0)
    416     {
     451    (&n, &ne, airn, ajcn, &wd_lkeep_, wd_keep_, wd_iwork_,
     452     wd_icntl_, wd_info_, wd_rinfo_);
     453
     454    if (wd_info_[0] < 0) {
    417455      Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
    418                      "*** Error from MA57AD *** INFO(0) = %d\n", wd_info[0]);
    419     }
    420 
    421     // Reserve memory for a_
    422     delete [] a_;
    423     a_  = new double[nonzeros_];
    424 
    425     IpData().TimingStats().LinearSystemSymbolicFactorization().End();
    426     return SYMSOLVER_SUCCESS;
    427   }
    428 
    429   ESymSolverStatus
    430   Ma57TSolverInterface::Factorization(const Index*      airn,
    431                                       const Index*      ajcn,
    432                                       bool              check_NegEVals,
    433                                       Index             numberOfNegEVals)
    434   {
    435     DBG_START_METH("Ma57TSolverInterface::Factorization",dbg_verbosity);
    436     IpData().TimingStats().LinearSystemFactorization().Start();
    437 
    438     // Allocate `ma57_pre_alloc' times the suggested memory.  To be on
    439     // the safe side.
    440     const int ma57_pre_alloc = 3;
    441    
    442     wd_lfact  = wd_info[8] * ma57_pre_alloc;
    443     wd_lifact = wd_info[9] * ma57_pre_alloc;
     456                     "*** Error from MA57AD *** INFO(0) = %d\n", wd_info_[0]);
     457    }
     458
     459    wd_lfact_  = (ipfint)((Number)wd_info_[8] * ma57_pre_alloc_);
     460    wd_lifact_ = (ipfint)((Number)wd_info_[9] * ma57_pre_alloc_);
    444461
    445462    // XXX MH:  Why is this necessary?  Is `::Factorization' called more
    446463    // than once per object lifetime?  Where should allocation take
    447464    // place, then?
    448     delete [] wd_fact;
    449     delete [] wd_ifact;
    450 
    451     wd_fact  = new double[wd_lfact];
    452     wd_ifact = new int[wd_lifact];
     465
     466    // AW: I moved this here now - my understanding is that wd_info[8]
     467    // and wd_info[9] are computed here, so we can just allocate the
     468    // amount of memory here.  I don't think there is any need to
     469    // reallocate it later for every factorization
     470    delete [] wd_fact_;
     471    delete [] wd_ifact_;
     472
     473    wd_fact_  = new double[wd_lfact_];
     474    wd_ifact_ = new int[wd_lifact_];
    453475
    454476    Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    455                    "Suggested lfact  (*%d):  %d\n", ma57_pre_alloc, wd_lfact);
     477                   "Suggested lfact  (*%e):  %d\n", ma57_pre_alloc_, wd_lfact_);
    456478    Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    457                    "Suggested lifact (*%d):  %d\n", ma57_pre_alloc, wd_lifact);
     479                   "Suggested lifact (*%e):  %d\n", ma57_pre_alloc_, wd_lifact_);
     480
     481    IpData().TimingStats().LinearSystemSymbolicFactorization().End();
     482    return SYMSOLVER_SUCCESS;
     483  }
     484
     485  ESymSolverStatus
     486  Ma57TSolverInterface::Factorization(const Index*  airn,
     487                                      const Index*  ajcn,
     488                                      bool          check_NegEVals,
     489                                      Index         numberOfNegEVals)
     490  {
     491    DBG_START_METH("Ma57TSolverInterface::Factorization",dbg_verbosity);
     492    IpData().TimingStats().LinearSystemFactorization().Start();
    458493
    459494    int fact_error = 1;
     
    462497    ipfint ne = nonzeros_;
    463498
    464     while (fact_error > 0)
    465     {
     499    while (fact_error > 0) {
    466500      F77_FUNC (ma57bd, MA57BD)
    467         (&n, &ne, a_, wd_fact, &wd_lfact, wd_ifact, &wd_lifact,
    468          &wd_lkeep, wd_keep, wd_iwork,
    469          wd_icntl, wd_cntl, wd_info, wd_rinfo);
    470 
    471       negevals_ = wd_info[24-1];   // Number of negative eigenvalues
    472 
    473       if (wd_info[0] == 0)
    474       {
    475         fact_error = 0;
    476       }
    477       else if (wd_info[0] == -3)
    478       {
    479         /* Failure due to insufficient REAL space on a call to MA57B/BD.
    480          * INFO(17) is set to a value that may suffice.  INFO(2) is set
    481          * to value of LFACT.  The user can allocate a larger array and
    482          * copy the contents of FACT into it using MA57E/ED, and recall
    483          * MA57B/BD.
    484          */
    485         double  *temp;
    486         int      ic = 0;
    487 
    488         wd_lfact = wd_info[16];
    489         temp = new double[wd_lfact];
    490 
    491         Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    492                        "Reallocating lfact (%d)\n", wd_lfact);
    493 
    494         F77_FUNC (ma57ed, MA57ED)
    495           (&n, &ic, wd_keep,
    496            wd_fact,  &wd_info[1], temp, &wd_lfact,
    497            wd_ifact, &wd_info[1], NULL, &wd_lfact,
    498            wd_info);
    499 
    500         delete [] wd_fact;
    501         wd_fact = temp;
    502       }
    503       else if (wd_info[0] == -4)
    504       {
    505         /* Failure due to insufficient INTEGER space on a call to
    506          * MA57B/BD.  INFO(18) is set to a value that may suffice.
    507          * INFO(2) is set to value of LIFACT.  The user can allocate a
    508          * larger array and copy the contents of IFACT into it using
    509          * MA57E/ED, and recall MA57B/BD.
    510          */
    511 
    512         int  *temp;
    513         int   ic = 1;
    514 
    515         wd_lifact = wd_info[17];
    516         temp = new int[wd_lifact];
    517 
    518         Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    519                        "Reallocating lifact (%d)\n", wd_lifact);
    520 
    521         F77_FUNC (ma57ed, MA57ED)
    522           (&n, &ic, wd_keep,
    523            wd_fact,  &wd_info[1], NULL, &wd_lifact,
    524            wd_ifact, &wd_info[1], temp, &wd_lifact,
    525            wd_info);
    526 
    527         delete [] wd_ifact;
    528         wd_ifact = temp;
    529       }
    530       else if (wd_info[0] < 0)
    531       {
    532         Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
    533                        "Error in MA57BD:  %d\n", wd_info[0]);
    534         std::cout << ma57_err_msg[-wd_info[1-1]] << std::endl;
     501      (&n, &ne, a_, wd_fact_, &wd_lfact_, wd_ifact_, &wd_lifact_,
     502       &wd_lkeep_, wd_keep_, wd_iwork_,
     503       wd_icntl_, wd_cntl_, wd_info_, wd_rinfo_);
     504
     505      negevals_ = wd_info_[24-1];   // Number of negative eigenvalues
     506
     507      if (wd_info_[0] == 0) {
     508        fact_error = 0;
     509      }
     510      else if (wd_info_[0] == -3) {
     511        /* Failure due to insufficient REAL space on a call to MA57B/BD.
     512         * INFO(17) is set to a value that may suffice.  INFO(2) is set
     513         * to value of LFACT.  The user can allocate a larger array and
     514         * copy the contents of FACT into it using MA57E/ED, and recall
     515         * MA57B/BD.
     516         */
     517        double  *temp;
     518        ipfint  ic = 0;
     519
     520        wd_lfact_ = wd_info_[16];
     521        temp = new double[wd_lfact_];
     522
     523        Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     524                       "Reallocating lfact (%d)\n", wd_lfact_);
     525
     526        F77_FUNC (ma57ed, MA57ED)
     527        (&n, &ic, wd_keep_,
     528         wd_fact_,  &wd_info_[1], temp, &wd_lfact_,
     529         wd_ifact_, &wd_info_[1], NULL, &wd_lfact_,
     530         wd_info_);
     531
     532        delete [] wd_fact_;
     533        wd_fact_ = temp;
     534      }
     535      else if (wd_info_[0] == -4) {
     536        /* Failure due to insufficient INTEGER space on a call to
     537         * MA57B/BD.  INFO(18) is set to a value that may suffice.
     538         * INFO(2) is set to value of LIFACT.  The user can allocate a
     539         * larger array and copy the contents of IFACT into it using
     540         * MA57E/ED, and recall MA57B/BD.
     541         */
     542
     543        ipfint  *temp;
     544        ipfint   ic = 1;
     545
     546        wd_lifact_ = wd_info_[17];
     547        temp = new ipfint[wd_lifact_];
     548
     549        Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     550                       "Reallocating lifact (%d)\n", wd_lifact_);
     551
     552        F77_FUNC (ma57ed, MA57ED)
     553        (&n, &ic, wd_keep_,
     554         wd_fact_,  &wd_info_[1], NULL, &wd_lifact_,
     555         wd_ifact_, &wd_info_[1], temp, &wd_lifact_,
     556         wd_info_);
     557
     558        delete [] wd_ifact_;
     559        wd_ifact_ = temp;
     560      }
     561      else if (wd_info_[0] < 0) {
     562        Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
     563                       "Error in MA57BD:  %d\n", wd_info_[0]);
     564        Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     565                       "MA57 Error message: %s\n",
     566                       ma57_err_msg[-wd_info_[1-1]].c_str());
     567        return SYMSOLVER_FATAL_ERROR;
    535568      }
    536569      // Check if the system is singular.
    537       else if (wd_info[0] == 4) {
    538         IpData().TimingStats().LinearSystemFactorization().End();
    539         Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    540                        "System singular, rank = %d\n", wd_info[25-1]);
    541         return SYMSOLVER_SINGULAR;
    542       }
    543       else if (wd_info[0] > 0)
    544       {
    545         Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
    546                        "Warning in MA57BD:  %d\n", wd_info[0]);
    547         std::cout << ma57_wrn_msg[wd_info[1-1]] << std::endl;
     570      else if (wd_info_[0] == 4) {
     571        IpData().TimingStats().LinearSystemFactorization().End();
     572        Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     573                       "System singular, rank = %d\n", wd_info_[25-1]);
     574        return SYMSOLVER_SINGULAR;
     575      }
     576      else if (wd_info_[0] > 0) {
     577        Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
     578                       "Warning in MA57BD:  %d\n", wd_info_[0]);
     579        Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     580                       "MA57 Warning message: %s\n",
     581                       ma57_wrn_msg[wd_info_[1-1]].c_str());
     582        // For now, abort the process so that we don't miss any problems
     583        return SYMSOLVER_FATAL_ERROR;
    548584      }
    549585    }
     
    558594      Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
    559595                     "In Ma57TSolverInterface::Factorization: "
    560                      "negevals_ = %d, but numberOfNegEVals = %d\n",
     596                     "negevals_ = %d, but numberOfNegEVals = %d\n",
    561597                     negevals_, numberOfNegEVals);
    562598      return SYMSOLVER_WRONG_INERTIA;
     
    566602  }
    567603
    568   ESymSolverStatus Ma57TSolverInterface::Backsolve(Index         nrhs,
    569                                                    double       *rhs_vals)
     604  ESymSolverStatus Ma57TSolverInterface::Backsolve(
     605    Index     nrhs,
     606    double    *rhs_vals)
    570607  {
    571608    DBG_START_METH("Ma27TSolverInterface::Backsolve",dbg_verbosity);
    572609    IpData().TimingStats().LinearSystemBackSolve().Start();
    573610
    574     ipfint  n      = dim_;
     611    ipfint  n      = dim_;
    575612    ipfint  job    = 1;
    576613
    577     ipfint  nrhs_X = 1;
     614    ipfint  nrhs_X = nrhs;
    578615    ipfint  lrhs   = n;
    579616
     
    586623    // For each right hand side, call MA57CD
    587624    // XXX MH: MA57 can do several RHSs; just do one solve...
    588     for(Index irhs=0; irhs<nrhs; irhs++) {
    589       if (DBG_VERBOSITY()>=2) {
     625    // AW: Ok is the following correct?
     626    if (DBG_VERBOSITY()>=2) {
     627      for(Index irhs=0; irhs<nrhs; irhs++) {
    590628        for (Index i=0; i<dim_; i++) {
    591           DBG_PRINT((2, "rhs[%5d] = %23.15e\n", i, rhs_vals[irhs*dim_+i]));
     629          DBG_PRINT((2, "rhs[%2d,%5d] = %23.15e\n", irhs, i, rhs_vals[irhs*dim_+i]));
    592630        }
    593631      }
    594 
    595       F77_FUNC (ma57cd, MA57CD)
    596         (&job, &n, wd_fact, &wd_lfact, wd_ifact, &wd_lifact,
    597          &nrhs_X, &rhs_vals[irhs*dim_], &lrhs,
    598          work, &lwork, wd_iwork,
    599          wd_icntl, wd_info);
    600 
    601       if (wd_info[0] != 0)
    602         Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
    603                        "Error in MA57CD:  %d.\n", wd_info[0]);
    604 
    605       if (DBG_VERBOSITY()>=2) {
     632    }
     633
     634    F77_FUNC (ma57cd, MA57CD)
     635    (&job, &n, wd_fact_, &wd_lfact_, wd_ifact_, &wd_lifact_,
     636     &nrhs_X, rhs_vals, &lrhs,
     637     work, &lwork, wd_iwork_,
     638     wd_icntl_, wd_info_);
     639
     640    if (wd_info_[0] != 0)
     641      Jnlst().Printf(J_ERROR, J_LINEAR_ALGEBRA,
     642                     "Error in MA57CD:  %d.\n", wd_info_[0]);
     643
     644    if (DBG_VERBOSITY()>=2) {
     645      for(Index irhs=0; irhs<nrhs; irhs++) {
    606646        for (Index i=0; i<dim_; i++) {
    607           DBG_PRINT((2, "sol[%5d] = %23.15e\n", i, rhs_vals[irhs*dim_+i]));
     647          DBG_PRINT((2, "sol[%2d,%5d] = %23.15e\n", irhs, i, rhs_vals[irhs*dim_+i]));
    608648        }
    609649      }
     
    627667  {
    628668    DBG_START_METH("Ma57TSolverInterface::IncreaseQuality",dbg_verbosity);
    629     // pivtol_ *= 2.5;
    630     return false;
     669    if (pivtol_ == pivtolmax_) {
     670      return false;
     671    }
     672    pivtol_changed_ = true;
     673
     674    Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     675                   "Indreasing pivot tolerance for MA57 from %7.2e ",
     676                   pivtol_);
     677    pivtol_ = Min(pivtolmax_, pow(pivtol_,0.75));
     678    Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     679                   "to %7.2e.\n",
     680                   pivtol_);
     681    return true;
    631682  }
    632683
  • branches/dev/Algorithm/LinearSolvers/IpMa57TSolverInterface.hpp

    r554 r555  
    4242     *  positions of the nonzero elements.
    4343     */
    44     virtual ESymSolverStatus InitializeStructure(Index           dim, Index nonzeros,
    45                                                  const Index    *airn,
    46                                                  const Index    *ajcn);
     44    virtual ESymSolverStatus InitializeStructure(
     45      Index        dim,
     46      Index nonzeros,
     47      const Index     *airn,
     48      const Index     *ajcn);
    4749
    4850    /** Method returing an internal array into which the nonzero
     
    5658     *  from SparseSymLinearSolverInterface.
    5759     */
    58     virtual ESymSolverStatus MultiSolve(bool            new_matrix,
    59                                         const Index*    airn,
    60                                         const Index*    ajcn,
    61                                         Index           nrhs,
    62                                         double*         rhs_vals,
    63                                         bool            check_NegEVals,
    64                                         Index           numberOfNegEVals);
     60    virtual ESymSolverStatus MultiSolve(bool        new_matrix,
     61                                        const Index*    airn,
     62                                        const Index*    ajcn,
     63                                        Index       nrhs,
     64                                        double*     rhs_vals,
     65                                        bool        check_NegEVals,
     66                                        Index       numberOfNegEVals);
    6567
    6668    /** Number of negative eigenvalues detected during last
     
    152154    /** Pivol tolerance */
    153155    Number pivtol_;
    154     /** Factor for estimating initial value of la */
    155     Number la_init_factor_;
     156    /** Maximal pivot tolerance */
     157    Number pivtolmax_;
     158    /** Factor for estimating initial size of work arrays */
     159    Number ma57_pre_alloc_;
    156160    /** Flag indicating whether the TNLP with identical structure has
    157161     *  already been solved before. */
     
    163167     */
    164168    //@{
    165 
    166 
    167     double   wd_cntl[5];
    168     ipfint   wd_icntl[20];
    169 
    170     ipfint   wd_info[40];
    171     double   wd_rinfo[20];
    172 
    173     ipfint   wd_lkeep;          /* LKEEP >= 5*N + NE + max(N,NE) + 42. */
    174     ipfint  *wd_keep;
    175 
    176     ipfint  *wd_iwork;          /* 5 * N. */
    177 
    178     double  *wd_fact;
    179     ipfint   wd_lfact;
    180     ipfint  *wd_ifact;
    181     ipfint   wd_lifact;
    182 
    183 
    184     /** length LA of A */
    185     ipfint la_;
     169    double   wd_cntl_[5];
     170    ipfint   wd_icntl_[20];
     171
     172    ipfint   wd_info_[40];
     173    double   wd_rinfo_[20];
     174
     175    ipfint   wd_lkeep_;      /* LKEEP >= 5*N + NE + max(N,NE) + 42. */
     176    ipfint  *wd_keep_;
     177
     178    ipfint  *wd_iwork_;      /* 5 * N. */
     179
     180    double  *wd_fact_;
     181    ipfint   wd_lfact_;
     182    ipfint  *wd_ifact_;
     183    ipfint   wd_lifact_;
     184
     185
    186186    /** factor A of matrix */
    187187    double* a_;
    188 
    189     /** flag indicating that la should be increased before next factorization
    190      */
    191     bool la_increase_;
    192188    //@}
    193189
     
    207203    ESymSolverStatus Factorization(const Index* airn,
    208204                                   const Index* ajcn,
    209                                    bool         check_NegEVals,
    210                                    Index        numberOfNegEVals);
     205                                   bool     check_NegEVals,
     206                                   Index    numberOfNegEVals);
    211207
    212208    /** Call MA57CD to do the backsolve.
    213209     */
    214     ESymSolverStatus Backsolve(Index     nrhs,
    215                                double   *rhs_vals);
     210    ESymSolverStatus Backsolve(Index     nrhs,
     211                               double   *rhs_vals);
    216212    //@}
    217213  };
  • branches/dev/Algorithm/LinearSolvers/IpPardisoSolverInterface.cpp

    r553 r555  
    5757      :
    5858      a_(NULL),
     59      negevals_(-1),
    5960      initialized_(false),
    6061
     
    6263      MNUM_(1),
    6364      MTYPE_(-2),
    64       MSGLVL_(0)
     65      MSGLVL_(0),
     66      debug_last_iter_(-1)
    6567  {
    6668    DBG_START_METH("PardisoSolverInterface::PardisoSolverInterface()",dbg_verbosity);
     
    9294  }
    9395
     96  void PardisoSolverInterface::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
     97  {
     98    // Todo Use keywords instead of integer numbers
     99    roptions->AddIntegerOption(
     100      "pardiso_iparm13",
     101      "Matching strategy",
     102      2,
     103      "Matching strategy:  1=Match complete, 2=Match complete+2x2, 3=Match constraints");
     104  }
     105
    94106  bool PardisoSolverInterface::InitializeImpl(const OptionsList& options,
    95107      const std::string& prefix)
    96108  {
     109    options.GetIntegerValue("pardiso_iparm13", match_strat_, prefix);
     110
     111    Jnlst().Printf(J_DETAILED, J_LINEAR_ALGEBRA,
     112                   "Pardiso matching strategy (IPARM(13)): %d\n", match_strat_);
     113
    97114    // Number value = 0.0;
    98115
     
    148165    // large number of pivot perturbation
    149166    // Matching information:  IPARM_[12] = 2 robust,  but more  expensive method
    150     IPARM_[12] = 2;
     167    IPARM_[12] = match_strat_;
    151168
    152169    IPARM_[20] = 1;
     
    235252  }
    236253
     254  static void
     255  write_iajaa_matrix (int           N,
     256                      const Index*  ia,
     257                      const Index*  ja,
     258                      double*       a_,
     259                      double*       rhs_vals,
     260                      int           iter_cnt,
     261                      int           sol_cnt)
     262  {
     263    if (getenv ("IPOPT_WRITE_MAT")) {
     264      /* Write header */
     265      FILE    *mat_file;
     266      char     mat_name[128];
     267      char     mat_pref[32];
     268
     269      ipfint   NNZ = ia[N]-1;
     270      ipfint   i;
     271
     272      if (getenv ("IPOPT_WRITE_PREFIX"))
     273        strcpy (mat_pref, getenv ("IPOPT_WRITE_PREFIX"));
     274      else
     275        strcpy (mat_pref, "mat-ipopt");
     276
     277      sprintf (mat_name, "%s_%03d-%02d.iajaa", mat_pref, iter_cnt, sol_cnt);
     278
     279      // Open and write matrix file.
     280      mat_file = fopen (mat_name, "w");
     281
     282      fprintf (mat_file, "%d\n", N);
     283      fprintf (mat_file, "%d\n", NNZ);
     284
     285      for (i = 0; i < N+1; i++)
     286        fprintf (mat_file, "%d\n", ia[i]);
     287      for (i = 0; i < NNZ; i++)
     288        fprintf (mat_file, "%d\n", ja[i]);
     289      for (i = 0; i < NNZ; i++)
     290        fprintf (mat_file, "%32.24e\n", a_[i]);
     291
     292      /* Right hand side. */
     293      if (rhs_vals)
     294        for (i = 0; i < N; i++)
     295          fprintf (mat_file, "%32.24e\n", rhs_vals[i]);
     296
     297      fclose (mat_file);
     298    }
     299  }
     300
    237301  ESymSolverStatus
    238302  PardisoSolverInterface::Factorization(const Index* ia,
     
    244308
    245309    // Call Pardiso to do the factorization
     310    ipfint PHASE = 12;
    246311    ipfint N = dim_;
    247     ipfint PHASE;
    248312    ipfint PERM;   // This should not be accessed by Pardiso
    249313    ipfint NRHS = 0;
     
    254318    ipfint ERROR;
    255319
    256     if (getenv ("IPOPT_WRITE_MAT")) {
    257 
    258       // Dump matrix to file...
    259       ipfint  NNZ = ia[N]-1;
    260       ipfint   i;
    261 
    262       if (IpData().iter_count() != debug_last_iter_) {
    263         debug_cnt_ = 0;
    264       }
    265 
    266       /* Write header */
    267       FILE    *mat_file;
    268       char     mat_name[128];
    269       char     mat_pref[32];
    270 
    271       if (getenv ("IPOPT_WRITE_PREFIX"))
    272         strcpy (mat_pref, getenv ("IPOPT_WRITE_PREFIX"));
    273       else
    274         strcpy (mat_pref, "mat-ipopt");
    275 
    276       sprintf (mat_name, "%s_%03d-%02d.iajaa", mat_pref, IpData().iter_count(), debug_cnt_);
    277       mat_file = fopen (mat_name, "w");
    278 
    279       fprintf (mat_file, "%d\n", N);
    280       fprintf (mat_file, "%d\n", NNZ);
    281 
    282       /* Write ia's */
    283       for (i = 0; i < N+1; i++)
    284         fprintf (mat_file, "%d\n", ia[i]);
    285 
    286       /* Write ja's */
    287       for (i = 0; i < NNZ; i++)
    288         fprintf (mat_file, "%d\n", ja[i]);
    289 
    290       /* Write values */
    291       for (i = 0; i < NNZ; i++)
    292         fprintf (mat_file, "%32.24e\n", a_[i]);
    293 
    294       // /* Write RHS */
    295       // for (i = 0; i < N; i++)
    296       //        fprintf (mat_file, "%32.24e\n", rhs_vals[i]);
    297 
    298       fclose (mat_file);
    299 
    300       debug_last_iter_ = IpData().iter_count();
    301       debug_cnt_++;
     320    // In case of factorization errors, write matrix w/o rhs.
     321    // write_iajaa_matrix (N, ia, ja, a_, NULL, IpData().iter_count(), debug_cnt);
     322
     323    F77_FUNC(pardiso,PARDISO)(PT_, &MAXFCT_, &MNUM_, &MTYPE_,
     324                              &PHASE, &N, a_, ia, ja, &PERM,
     325                              &NRHS, IPARM_, &MSGLVL_, &B, &X,
     326                              &ERROR);
     327    if (ERROR==-4) {
     328      // I think this means that the matrix is singular
     329      return SYMSOLVER_SINGULAR;
    302330    }
    303331
     
    410438    ipfint ERROR;
    411439
     440
     441    // Dump matrix to file, and count number of solution steps.
     442    if (IpData().iter_count() != debug_last_iter_)
     443      debug_cnt_ = 0;
     444
     445    write_iajaa_matrix (N, ia, ja, a_, rhs_vals, IpData().iter_count(), debug_cnt_);
     446
     447    debug_last_iter_ = IpData().iter_count();
     448    debug_cnt_ ++;
     449
    412450    F77_FUNC(pardiso,PARDISO)(PT_, &MAXFCT_, &MNUM_, &MTYPE_,
    413451                              &PHASE, &N, a_, ia, ja, &PERM,
     
    415453                              &ERROR);
    416454
    417     // The following delete was missing (memory leak?)
    418455    delete [] X; /* OLAF/MICHAEL: do we really need X? */
    419456
  • branches/dev/Algorithm/LinearSolvers/IpPardisoSolverInterface.hpp

    r533 r555  
    8585    //@}
    8686
     87    /** Methods for IpoptType */
     88    //@{
     89    static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
     90    //@}
     91
    8792  private:
    8893    /**@name Default Compiler Generated Methods
     
    117122    /** Number of negative eigenvalues */
    118123    Index negevals_;
     124    //@}
     125
     126    /** @name Solver specific options */
     127    //@{
     128    /** Option that controls the matching strategy. */
     129    int match_strat_;
    119130    //@}
    120131
  • branches/dev/Algorithm/LinearSolvers/Makefile.am

    r465 r555  
    2222  liblinsolvers_a_SOURCES += \
    2323        IpMa27TSolverInterface.cpp IpMa27TSolverInterface.hpp
     24endif
     25
     26if HAVE_MA57
     27  liblinsolvers_a_SOURCES += \
     28        IpMa57TSolverInterface.cpp IpMa57TSolverInterface.hpp
    2429endif
    2530
     
    5156        IpLinearSolversRegOp.cppbak IpLinearSolversRegOp.hppbak \
    5257        IpMa27TSolverInterface.cppbak IpMa27TSolverInterface.hppbak \
     58        IpMa57TSolverInterface.cppbak IpMa57TSolverInterface.hppbak \
    5359        IpMc19TSymScalingMethod.cppbak IpMc19TSymScalingMethod.hppbak \
    5460        IpSparseSymLinearSolverInterface.hppbak \
  • branches/dev/Algorithm/LinearSolvers/Makefile.in

    r465 r555  
    4747@HAVE_MA27_TRUE@        IpMa27TSolverInterface.cpp IpMa27TSolverInterface.hpp
    4848
    49 @HAVE_MC19_TRUE@am__append_2 = \
     49@HAVE_MA57_TRUE@am__append_2 = \
     50@HAVE_MA57_TRUE@        IpMa57TSolverInterface.cpp IpMa57TSolverInterface.hpp
     51
     52@HAVE_MC19_TRUE@am__append_3 = \
    5053@HAVE_MC19_TRUE@        IpMc19TSymScalingMethod.cpp IpMc19TSymScalingMethod.hpp
    5154
    52 @HAVE_PARDISO_TRUE@am__append_3 = \
     55@HAVE_PARDISO_TRUE@am__append_4 = \
    5356@HAVE_PARDISO_TRUE@     IpPardisoSolverInterface.cpp IpPardisoSolverInterface.hpp
    5457
    55 @HAVE_TAUCS_TRUE@am__append_4 = \
     58@HAVE_TAUCS_TRUE@am__append_5 = \
    5659@HAVE_TAUCS_TRUE@       IpTAUCSSolverInterface.cpp IpTAUCSSolverInterface.hpp
    5760
     
    7477        IpTSymLinearSolver.hpp IpTSymScalingMethod.hpp \
    7578        IpMa27TSolverInterface.cpp IpMa27TSolverInterface.hpp \
     79        IpMa57TSolverInterface.cpp IpMa57TSolverInterface.hpp \
    7680        IpMc19TSymScalingMethod.cpp IpMc19TSymScalingMethod.hpp \
    7781        IpPardisoSolverInterface.cpp IpPardisoSolverInterface.hpp \
    7882        IpTAUCSSolverInterface.cpp IpTAUCSSolverInterface.hpp
    7983@HAVE_MA27_TRUE@am__objects_1 = IpMa27TSolverInterface.$(OBJEXT)
    80 @HAVE_MC19_TRUE@am__objects_2 = IpMc19TSymScalingMethod.$(OBJEXT)
    81 @HAVE_PARDISO_TRUE@am__objects_3 = IpPardisoSolverInterface.$(OBJEXT)
    82 @HAVE_TAUCS_TRUE@am__objects_4 = IpTAUCSSolverInterface.$(OBJEXT)
     84@HAVE_MA57_TRUE@am__objects_2 = IpMa57TSolverInterface.$(OBJEXT)
     85@HAVE_MC19_TRUE@am__objects_3 = IpMc19TSymScalingMethod.$(OBJEXT)
     86@HAVE_PARDISO_TRUE@am__objects_4 = IpPardisoSolverInterface.$(OBJEXT)
     87@HAVE_TAUCS_TRUE@am__objects_5 = IpTAUCSSolverInterface.$(OBJEXT)
    8388am_liblinsolvers_a_OBJECTS = IpLinearSolversRegOp.$(OBJEXT) \
    8489        IpTripletToCSRConverter.$(OBJEXT) IpTSymLinearSolver.$(OBJEXT) \
    8590        $(am__objects_1) $(am__objects_2) $(am__objects_3) \
    86         $(am__objects_4)
     91        $(am__objects_4) $(am__objects_5)
    8792liblinsolvers_a_OBJECTS = $(am_liblinsolvers_a_OBJECTS)
    8893DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/inc
     
    134139BUILDMA27_FALSE = @BUILDMA27_FALSE@
    135140BUILDMA27_TRUE = @BUILDMA27_TRUE@
     141BUILDMA57_FALSE = @BUILDMA57_FALSE@
     142BUILDMA57_TRUE = @BUILDMA57_TRUE@
    136143BUILDMC19_FALSE = @BUILDMC19_FALSE@
    137144BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    160167HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    161168HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     169HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     170HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    162171HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    163172HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
     
    241250        IpTripletToCSRConverter.hpp IpTSymLinearSolver.cpp \
    242251        IpTSymLinearSolver.hpp IpTSymScalingMethod.hpp $(am__append_1) \
    243         $(am__append_2) $(am__append_3) $(am__append_4)
     252        $(am__append_2) $(am__append_3) $(am__append_4) \
     253        $(am__append_5)
    244254
    245255# Astyle stuff
     
    247257        IpLinearSolversRegOp.cppbak IpLinearSolversRegOp.hppbak \
    248258        IpMa27TSolverInterface.cppbak IpMa27TSolverInterface.hppbak \
     259        IpMa57TSolverInterface.cppbak IpMa57TSolverInterface.hppbak \
    249260        IpMc19TSymScalingMethod.cppbak IpMc19TSymScalingMethod.hppbak \
    250261        IpSparseSymLinearSolverInterface.hppbak \
     
    307318@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpLinearSolversRegOp.Po@am__quote@
    308319@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpMa27TSolverInterface.Po@am__quote@
     320@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpMa57TSolverInterface.Po@am__quote@
    309321@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpMc19TSymScalingMethod.Po@am__quote@
    310322@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpPardisoSolverInterface.Po@am__quote@
  • branches/dev/Algorithm/Makefile.in

    r542 r555  
    132132BUILDMA27_FALSE = @BUILDMA27_FALSE@
    133133BUILDMA27_TRUE = @BUILDMA27_TRUE@
     134BUILDMA57_FALSE = @BUILDMA57_FALSE@
     135BUILDMA57_TRUE = @BUILDMA57_TRUE@
    134136BUILDMC19_FALSE = @BUILDMC19_FALSE@
    135137BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    158160HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    159161HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     162HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     163HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    160164HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    161165HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Apps/AmplSolver/Makefile.in

    r465 r555  
    121121BUILDMA27_FALSE = @BUILDMA27_FALSE@
    122122BUILDMA27_TRUE = @BUILDMA27_TRUE@
     123BUILDMA57_FALSE = @BUILDMA57_FALSE@
     124BUILDMA57_TRUE = @BUILDMA57_TRUE@
    123125BUILDMC19_FALSE = @BUILDMC19_FALSE@
    124126BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    148150HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    149151HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     152HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     153HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    150154HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    151155HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Apps/CUTErInterface/Makefile.in

    r465 r555  
    9797BUILDMA27_FALSE = @BUILDMA27_FALSE@
    9898BUILDMA27_TRUE = @BUILDMA27_TRUE@
     99BUILDMA57_FALSE = @BUILDMA57_FALSE@
     100BUILDMA57_TRUE = @BUILDMA57_TRUE@
    99101BUILDMC19_FALSE = @BUILDMC19_FALSE@
    100102BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    121123HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    122124HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     125HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     126HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    123127HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    124128HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Apps/Makefile.in

    r465 r555  
    9494BUILDMA27_FALSE = @BUILDMA27_FALSE@
    9595BUILDMA27_TRUE = @BUILDMA27_TRUE@
     96BUILDMA57_FALSE = @BUILDMA57_FALSE@
     97BUILDMA57_TRUE = @BUILDMA57_TRUE@
    9698BUILDMC19_FALSE = @BUILDMC19_FALSE@
    9799BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    118120HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    119121HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     122HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     123HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    120124HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    121125HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Common/Makefile.in

    r465 r555  
    120120BUILDMA27_FALSE = @BUILDMA27_FALSE@
    121121BUILDMA27_TRUE = @BUILDMA27_TRUE@
     122BUILDMA57_FALSE = @BUILDMA57_FALSE@
     123BUILDMA57_TRUE = @BUILDMA57_TRUE@
    122124BUILDMC19_FALSE = @BUILDMC19_FALSE@
    123125BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    144146HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    145147HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     148HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     149HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    146150HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    147151HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Extern/ASL/Makefile.in

    r465 r555  
    8282BUILDMA27_FALSE = @BUILDMA27_FALSE@
    8383BUILDMA27_TRUE = @BUILDMA27_TRUE@
     84BUILDMA57_FALSE = @BUILDMA57_FALSE@
     85BUILDMA57_TRUE = @BUILDMA57_TRUE@
    8486BUILDMC19_FALSE = @BUILDMC19_FALSE@
    8587BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    106108HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    107109HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     110HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     111HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    108112HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    109113HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Extern/HSL/Makefile.am

    r455 r555  
    1919endif
    2020
     21if BUILDMA27
     22  nodist_libiphsl_a_SOURCES += ma57ad.f
     23endif
     24
    2125if BUILDMC19
    2226  nodist_libiphsl_a_SOURCES += mc19ad.f
  • branches/dev/Extern/HSL/Makefile.in

    r465 r555  
    4242POST_UNINSTALL = :
    4343build_triplet = @build@
    44 @BUILDMA27_TRUE@am__append_1 = ma27ad.f
     44@BUILDMA27_TRUE@am__append_1 = ma27ad.f ma57ad.f
    4545@BUILDMC19_TRUE@am__append_2 = mc19ad.f
    4646subdir = Extern/HSL
     
    5656libiphsl_a_AR = $(AR) $(ARFLAGS)
    5757libiphsl_a_LIBADD =
    58 @BUILDMA27_TRUE@am__objects_1 = ma27ad.$(OBJEXT)
     58@BUILDMA27_TRUE@am__objects_1 = ma27ad.$(OBJEXT) ma57ad.$(OBJEXT)
    5959@BUILDMC19_TRUE@am__objects_2 = mc19ad.$(OBJEXT)
    6060nodist_libiphsl_a_OBJECTS = $(am__objects_1) $(am__objects_2)
     
    101101BUILDMA27_FALSE = @BUILDMA27_FALSE@
    102102BUILDMA27_TRUE = @BUILDMA27_TRUE@
     103BUILDMA57_FALSE = @BUILDMA57_FALSE@
     104BUILDMA57_TRUE = @BUILDMA57_TRUE@
    103105BUILDMC19_FALSE = @BUILDMC19_FALSE@
    104106BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    125127HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    126128HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     129HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     130HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    127131HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    128132HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Extern/Makefile.in

    r465 r555  
    9494BUILDMA27_FALSE = @BUILDMA27_FALSE@
    9595BUILDMA27_TRUE = @BUILDMA27_TRUE@
     96BUILDMA57_FALSE = @BUILDMA57_FALSE@
     97BUILDMA57_TRUE = @BUILDMA57_TRUE@
    9698BUILDMC19_FALSE = @BUILDMC19_FALSE@
    9799BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    118120HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    119121HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     122HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     123HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    120124HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    121125HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Extern/blas/Makefile.in

    r465 r555  
    151151BUILDMA27_FALSE = @BUILDMA27_FALSE@
    152152BUILDMA27_TRUE = @BUILDMA27_TRUE@
     153BUILDMA57_FALSE = @BUILDMA57_FALSE@
     154BUILDMA57_TRUE = @BUILDMA57_TRUE@
    153155BUILDMC19_FALSE = @BUILDMC19_FALSE@
    154156BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    175177HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    176178HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     179HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     180HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    177181HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    178182HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Interfaces/Makefile.in

    r465 r555  
    120120BUILDMA27_FALSE = @BUILDMA27_FALSE@
    121121BUILDMA27_TRUE = @BUILDMA27_TRUE@
     122BUILDMA57_FALSE = @BUILDMA57_FALSE@
     123BUILDMA57_TRUE = @BUILDMA57_TRUE@
    122124BUILDMC19_FALSE = @BUILDMC19_FALSE@
    123125BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    146148HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    147149HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     150HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     151HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    148152HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    149153HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/LinAlg/Makefile.in

    r465 r555  
    131131BUILDMA27_FALSE = @BUILDMA27_FALSE@
    132132BUILDMA27_TRUE = @BUILDMA27_TRUE@
     133BUILDMA57_FALSE = @BUILDMA57_FALSE@
     134BUILDMA57_TRUE = @BUILDMA57_TRUE@
    133135BUILDMC19_FALSE = @BUILDMC19_FALSE@
    134136BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    155157HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    156158HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     159HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     160HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    157161HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    158162HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/LinAlg/TMatrices/Makefile.in

    r465 r555  
    107107BUILDMA27_FALSE = @BUILDMA27_FALSE@
    108108BUILDMA27_TRUE = @BUILDMA27_TRUE@
     109BUILDMA57_FALSE = @BUILDMA57_FALSE@
     110BUILDMA57_TRUE = @BUILDMA57_TRUE@
    109111BUILDMC19_FALSE = @BUILDMC19_FALSE@
    110112BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    131133HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    132134HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     135HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     136HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    133137HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    134138HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/Makefile.in

    r484 r555  
    114114BUILDMA27_FALSE = @BUILDMA27_FALSE@
    115115BUILDMA27_TRUE = @BUILDMA27_TRUE@
     116BUILDMA57_FALSE = @BUILDMA57_FALSE@
     117BUILDMA57_TRUE = @BUILDMA57_TRUE@
    116118BUILDMC19_FALSE = @BUILDMC19_FALSE@
    117119BUILDMC19_TRUE = @BUILDMC19_TRUE@
     
    138140HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
    139141HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     142HAVE_MA57_FALSE = @HAVE_MA57_FALSE@
     143HAVE_MA57_TRUE = @HAVE_MA57_TRUE@
    140144HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
    141145HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
  • branches/dev/configure

    r537 r555  
    320320#endif"
    321321
    322 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXXLIBS AR ARFLAGS AR_X CC CFLAGS ac_ct_CC F77 FFLAGS ac_ct_F77 FLIBS RANLIB ac_ct_RANLIB LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CXXCPP EGREP IPADDLIBS TAUCS_INCFLAGS ASLMAKEFLAGS ASLMAKEFILECMDS ASTYLE ASTYLEFLAGS ipoptlib AMPL_CPPFLAGS IPALLLIBS BUILDBLAS_TRUE BUILDBLAS_FALSE BUILDHSL_TRUE BUILDHSL_FALSE BUILDMA27_TRUE BUILDMA27_FALSE BUILDMC19_TRUE BUILDMC19_FALSE BUILDBLASDIR_TRUE BUILDBLASDIR_FALSE BUILDHSLDIR_TRUE BUILDHSLDIR_FALSE HAVE_MA27_TRUE HAVE_MA27_FALSE HAVE_MC19_TRUE HAVE_MC19_FALSE HAVE_PARDISO_TRUE HAVE_PARDISO_FALSE HAVE_TAUCS_TRUE HAVE_TAUCS_FALSE BUILDASLDIR_TRUE BUILDASLDIR_FALSE BUILDAMPLINTERFACE_TRUE BUILDAMPLINTERFACE_FALSE ASLLIB LIBOBJS LTLIBOBJS'
     322ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXXLIBS AR ARFLAGS AR_X CC CFLAGS ac_ct_CC F77 FFLAGS ac_ct_F77 FLIBS RANLIB ac_ct_RANLIB LN_S INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CXXCPP EGREP IPADDLIBS TAUCS_INCFLAGS ASLMAKEFLAGS ASLMAKEFILECMDS ASTYLE ASTYLEFLAGS ipoptlib AMPL_CPPFLAGS IPALLLIBS BUILDBLAS_TRUE BUILDBLAS_FALSE BUILDHSL_TRUE BUILDHSL_FALSE BUILDMA27_TRUE BUILDMA27_FALSE BUILDMA57_TRUE BUILDMA57_FALSE BUILDMC19_TRUE BUILDMC19_FALSE BUILDBLASDIR_TRUE BUILDBLASDIR_FALSE BUILDHSLDIR_TRUE BUILDHSLDIR_FALSE HAVE_MA27_TRUE HAVE_MA27_FALSE HAVE_MA57_TRUE HAVE_MA57_FALSE HAVE_MC19_TRUE HAVE_MC19_FALSE HAVE_PARDISO_TRUE HAVE_PARDISO_FALSE HAVE_TAUCS_TRUE HAVE_TAUCS_FALSE BUILDASLDIR_TRUE BUILDASLDIR_FALSE BUILDAMPLINTERFACE_TRUE BUILDAMPLINTERFACE_FALSE ASLLIB LIBOBJS LTLIBOBJS'
    323323ac_subst_files=''
    324324
     
    74867486          fi
    74877487
     7488for ac_header in cstdlib
     7489do
     7490as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     7491if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7492  echo "$as_me:$LINENO: checking for $ac_header" >&5
     7493echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7494if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7495  echo $ECHO_N "(cached) $ECHO_C" >&6
     7496fi
     7497echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7498echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7499else
     7500  # Is the header compilable?
     7501echo "$as_me:$LINENO: checking $ac_header usability" >&5
     7502echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     7503cat >conftest.$ac_ext <<_ACEOF
     7504/* confdefs.h.  */
     7505_ACEOF
     7506cat confdefs.h >>conftest.$ac_ext
     7507cat >>conftest.$ac_ext <<_ACEOF
     7508/* end confdefs.h.  */
     7509$ac_includes_default
     7510#include <$ac_header>
     7511_ACEOF
     7512rm -f conftest.$ac_objext
     7513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7514  (eval $ac_compile) 2>conftest.er1
     7515  ac_status=$?
     7516  grep -v '^ *+' conftest.er1 >conftest.err
     7517  rm -f conftest.er1
     7518  cat conftest.err >&5
     7519  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7520  (exit $ac_status); } &&
     7521         { ac_try='test -z "$ac_cxx_werror_flag"
     7522                         || test ! -s conftest.err'
     7523  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7524  (eval $ac_try) 2>&5
     7525  ac_status=$?
     7526  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7527  (exit $ac_status); }; } &&
     7528         { ac_try='test -s conftest.$ac_objext'
     7529  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7530  (eval $ac_try) 2>&5
     7531  ac_status=$?
     7532  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7533  (exit $ac_status); }; }; then
     7534  ac_header_compiler=yes
     7535else
     7536  echo "$as_me: failed program was:" >&5
     7537sed 's/^/| /' conftest.$ac_ext >&5
     7538
     7539ac_header_compiler=no
     7540fi
     7541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7542echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     7543echo "${ECHO_T}$ac_header_compiler" >&6
     7544
     7545# Is the header present?
     7546echo "$as_me:$LINENO: checking $ac_header presence" >&5
     7547echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     7548cat >conftest.$ac_ext <<_ACEOF
     7549/* confdefs.h.  */
     7550_ACEOF
     7551cat confdefs.h >>conftest.$ac_ext
     7552cat >>conftest.$ac_ext <<_ACEOF
     7553/* end confdefs.h.  */
     7554#include <$ac_header>
     7555_ACEOF
     7556if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     7557  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     7558  ac_status=$?
     7559  grep -v '^ *+' conftest.er1 >conftest.err
     7560  rm -f conftest.er1
     7561  cat conftest.err >&5
     7562  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7563  (exit $ac_status); } >/dev/null; then
     7564  if test -s conftest.err; then
     7565    ac_cpp_err=$ac_cxx_preproc_warn_flag
     7566    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
     7567  else
     7568    ac_cpp_err=
     7569  fi
     7570else
     7571  ac_cpp_err=yes
     7572fi
     7573if test -z "$ac_cpp_err"; then
     7574  ac_header_preproc=yes
     7575else
     7576  echo "$as_me: failed program was:" >&5
     7577sed 's/^/| /' conftest.$ac_ext >&5
     7578
     7579  ac_header_preproc=no
     7580fi
     7581rm -f conftest.err conftest.$ac_ext
     7582echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     7583echo "${ECHO_T}$ac_header_preproc" >&6
     7584
     7585# So?  What about this header?
     7586case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     7587  yes:no: )
     7588    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     7589echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     7590    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     7591echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     7592    ac_header_preproc=yes
     7593    ;;
     7594  no:yes:* )
     7595    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     7596echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     7597    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     7598echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     7599    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     7600echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     7601    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     7602echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     7603    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     7604echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     7605    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     7606echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     7607    (
     7608      cat <<\_ASBOX
     7609## ----------------------------------------- ##
     7610## Report this to coin-ipopt@www-124.ibm.com ##
     7611## ----------------------------------------- ##
     7612_ASBOX
     7613    ) |
     7614      sed "s/^/$as_me: WARNING:     /" >&2
     7615    ;;
     7616esac
     7617echo "$as_me:$LINENO: checking for $ac_header" >&5
     7618echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7619if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7620  echo $ECHO_N "(cached) $ECHO_C" >&6
     7621else
     7622  eval "$as_ac_Header=\$ac_header_preproc"
     7623fi
     7624echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7625echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7626
     7627fi
     7628if test `eval echo '${'$as_ac_Header'}'` = yes; then
     7629  cat >>confdefs.h <<_ACEOF
     7630#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     7631_ACEOF
     7632
     7633fi
     7634
     7635done
     7636
     7637          if test ! "$ac_cv_header_cstdlib" = "yes"; then
     7638
     7639for ac_header in stdlib.h
     7640do
     7641as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     7642if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7643  echo "$as_me:$LINENO: checking for $ac_header" >&5
     7644echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7645if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7646  echo $ECHO_N "(cached) $ECHO_C" >&6
     7647fi
     7648echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7649echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7650else
     7651  # Is the header compilable?
     7652echo "$as_me:$LINENO: checking $ac_header usability" >&5
     7653echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     7654cat >conftest.$ac_ext <<_ACEOF
     7655/* confdefs.h.  */
     7656_ACEOF
     7657cat confdefs.h >>conftest.$ac_ext
     7658cat >>conftest.$ac_ext <<_ACEOF
     7659/* end confdefs.h.  */
     7660$ac_includes_default
     7661#include <$ac_header>
     7662_ACEOF
     7663rm -f conftest.$ac_objext
     7664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     7665  (eval $ac_compile) 2>conftest.er1
     7666  ac_status=$?
     7667  grep -v '^ *+' conftest.er1 >conftest.err
     7668  rm -f conftest.er1
     7669  cat conftest.err >&5
     7670  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7671  (exit $ac_status); } &&
     7672         { ac_try='test -z "$ac_cxx_werror_flag"
     7673                         || test ! -s conftest.err'
     7674  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7675  (eval $ac_try) 2>&5
     7676  ac_status=$?
     7677  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7678  (exit $ac_status); }; } &&
     7679         { ac_try='test -s conftest.$ac_objext'
     7680  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7681  (eval $ac_try) 2>&5
     7682  ac_status=$?
     7683  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7684  (exit $ac_status); }; }; then
     7685  ac_header_compiler=yes
     7686else
     7687  echo "$as_me: failed program was:" >&5
     7688sed 's/^/| /' conftest.$ac_ext >&5
     7689
     7690ac_header_compiler=no
     7691fi
     7692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     7693echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     7694echo "${ECHO_T}$ac_header_compiler" >&6
     7695
     7696# Is the header present?
     7697echo "$as_me:$LINENO: checking $ac_header presence" >&5
     7698echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     7699cat >conftest.$ac_ext <<_ACEOF
     7700/* confdefs.h.  */
     7701_ACEOF
     7702cat confdefs.h >>conftest.$ac_ext
     7703cat >>conftest.$ac_ext <<_ACEOF
     7704/* end confdefs.h.  */
     7705#include <$ac_header>
     7706_ACEOF
     7707if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     7708  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     7709  ac_status=$?
     7710  grep -v '^ *+' conftest.er1 >conftest.err
     7711  rm -f conftest.er1
     7712  cat conftest.err >&5
     7713  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7714  (exit $ac_status); } >/dev/null; then
     7715  if test -s conftest.err; then
     7716    ac_cpp_err=$ac_cxx_preproc_warn_flag
     7717    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
     7718  else
     7719    ac_cpp_err=
     7720  fi
     7721else
     7722  ac_cpp_err=yes
     7723fi
     7724if test -z "$ac_cpp_err"; then
     7725  ac_header_preproc=yes
     7726else
     7727  echo "$as_me: failed program was:" >&5
     7728sed 's/^/| /' conftest.$ac_ext >&5
     7729
     7730  ac_header_preproc=no
     7731fi
     7732rm -f conftest.err conftest.$ac_ext
     7733echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     7734echo "${ECHO_T}$ac_header_preproc" >&6
     7735
     7736# So?  What about this header?
     7737case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
     7738  yes:no: )
     7739    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     7740echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     7741    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     7742echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     7743    ac_header_preproc=yes
     7744    ;;
     7745  no:yes:* )
     7746    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     7747echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     7748    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     7749echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     7750    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     7751echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     7752    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     7753echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     7754    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     7755echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     7756    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     7757echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     7758    (
     7759      cat <<\_ASBOX
     7760## ----------------------------------------- ##
     7761## Report this to coin-ipopt@www-124.ibm.com ##
     7762## ----------------------------------------- ##
     7763_ASBOX
     7764    ) |
     7765      sed "s/^/$as_me: WARNING:     /" >&2
     7766    ;;
     7767esac
     7768echo "$as_me:$LINENO: checking for $ac_header" >&5
     7769echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     7770if eval "test \"\${$as_ac_Header+set}\" = set"; then
     7771  echo $ECHO_N "(cached) $ECHO_C" >&6
     7772else
     7773  eval "$as_ac_Header=\$ac_header_preproc"
     7774fi
     7775echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7776echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     7777
     7778fi
     7779if test `eval echo '${'$as_ac_Header'}'` = yes; then
     7780  cat >>confdefs.h <<_ACEOF
     7781#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     7782_ACEOF
     7783
     7784fi
     7785
     7786done
     7787
     7788          fi
     7789
    74887790for ac_header in cstdarg
    74897791do
     
    96909992fi
    96919993
     9994  as_ac_File=`echo "ac_cv_file_$hslsrcdir/ma57ad.f" | $as_tr_sh`
     9995echo "$as_me:$LINENO: checking for $hslsrcdir/ma57ad.f" >&5
     9996echo $ECHO_N "checking for $hslsrcdir/ma57ad.f... $ECHO_C" >&6
     9997if eval "test \"\${$as_ac_File+set}\" = set"; then
     9998  echo $ECHO_N "(cached) $ECHO_C" >&6
     9999else
     10000  test "$cross_compiling" = yes &&
     10001  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
     10002echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
     10003   { (exit 1); exit 1; }; }
     10004if test -r "$hslsrcdir/ma57ad.f"; then
     10005  eval "$as_ac_File=yes"
     10006else
     10007  eval "$as_ac_File=no"
     10008fi
     10009fi
     10010echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
     10011echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
     10012if test `eval echo '${'$as_ac_File'}'` = yes; then
     10013
     10014cat >>confdefs.h <<\_ACEOF
     10015#define HAVE_MA57 1
     10016_ACEOF
     10017 use_MA57=BUILD
     10018else
     10019  use_MA57=no
     10020fi
     10021
    969210022else
    969310023  SAVE_LIBS="$LIBS"
     
    994210272rm -f conftest.err conftest.$ac_objext \
    994310273      conftest$ac_exeext conftest.$ac_ext
     10274  echo "$as_me:$LINENO: checking for ma57ad in $use_hsl" >&5
     10275echo $ECHO_N "checking for ma57ad in $use_hsl... $ECHO_C" >&6
     10276          use_MA57=
     10277          ac_ext=f
     10278ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
     10279ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     10280ac_compiler_gnu=$ac_cv_f77_compiler_gnu
     10281case $ac_cv_f77_mangling in
     10282  upper*) ac_val="MA57AD" ;;
     10283  lower*) ac_val="ma57ad" ;;
     10284  *)      ac_val="unknown" ;;
     10285esac
     10286case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac
     10287
     10288cfunc="$ac_val"
     10289
     10290ac_ext=cc
     10291ac_cpp='$CXXCPP $CPPFLAGS'
     10292ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     10293ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     10294ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     10295
     10296          cat >conftest.$ac_ext <<_ACEOF
     10297/* confdefs.h.  */
     10298_ACEOF
     10299cat confdefs.h >>conftest.$ac_ext
     10300cat >>conftest.$ac_ext <<_ACEOF
     10301/* end confdefs.h.  */
     10302extern "C" {void $cfunc();}
     10303#ifdef F77_DUMMY_MAIN
     10304
     10305#  ifdef __cplusplus
     10306     extern "C"
     10307#  endif
     10308   int F77_DUMMY_MAIN() { return 1; }
     10309
     10310#endif
     10311int
     10312main ()
     10313{
     10314$cfunc()
     10315  ;
     10316  return 0;
     10317}
     10318_ACEOF
     10319rm -f conftest.$ac_objext conftest$ac_exeext
     10320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     10321  (eval $ac_link) 2>conftest.er1
     10322  ac_status=$?
     10323  grep -v '^ *+' conftest.er1 >conftest.err
     10324  rm -f conftest.er1
     10325  cat conftest.err >&5
     10326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     10327  (exit $ac_status); } &&
     10328         { ac_try='test -z "$ac_cxx_werror_flag"
     10329                         || test ! -s conftest.err'
     10330  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     10331  (eval $ac_try) 2>&5
     10332  ac_status=$?
     10333  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     10334  (exit $ac_status); }; } &&
     10335         { ac_try='test -s conftest$ac_exeext'
     10336  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     10337  (eval $ac_try) 2>&5
     10338  ac_status=$?
     10339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     10340  (exit $ac_status); }; }; then
     10341
     10342cat >>confdefs.h <<\_ACEOF
     10343#define HAVE_MA57 1
     10344_ACEOF
     10345
     10346                       echo "$as_me:$LINENO: result: yes" >&5
     10347echo "${ECHO_T}yes" >&6; use_MA57=yes
     10348else
     10349  echo "$as_me: failed program was:" >&5
     10350sed 's/^/| /' conftest.$ac_ext >&5
     10351
     10352echo "$as_me:$LINENO: result: no" >&5
     10353echo "${ECHO_T}no" >&6; use_MA57=no
     10354fi
     10355rm -f conftest.err conftest.$ac_objext \
     10356      conftest$ac_exeext conftest.$ac_ext
    994410357  LIBS="$use_hsl $SAVE_LIBS"
    994510358fi
     
    1001810431fi;
    1001910432
    10020 if test "$use_MA27" = "no" -a "$use_pardiso" = "no" -a "$use_taucs" = no; then
     10433if test "$use_MA27" = "no" -a "$use_MA57" = "no" -a "$use_pardiso" = "no" -a "$use_taucs" = no; then
    1002110434  if test "$distconf" = false; then
    1002210435    { { echo "$as_me:$LINENO: error: \"No linear solver (such as MA27) available\"" >&5
     
    1044110854
    1044210855
     10856if test "$use_MA57" = BUILD; then
     10857  BUILDMA57_TRUE=
     10858  BUILDMA57_FALSE='#'
     10859else
     10860  BUILDMA57_TRUE='#'
     10861  BUILDMA57_FALSE=
     10862fi
     10863
     10864
     10865
    1044310866if test "$use_MC19" = BUILD; then
    1044410867  BUILDMC19_TRUE=
     
    1048010903  HAVE_MA27_TRUE='#'
    1048110904  HAVE_MA27_FALSE=
     10905fi
     10906
     10907
     10908
     10909if test ! "$use_MA57" = no; then
     10910  HAVE_MA57_TRUE=
     10911  HAVE_MA57_FALSE='#'
     10912else
     10913  HAVE_MA57_TRUE='#'
     10914  HAVE_MA57_FALSE=
    1048210915fi
    1048310916
     
    1069611129   { (exit 1); exit 1; }; }
    1069711130fi
     11131if test -z "${BUILDMA57_TRUE}" && test -z "${BUILDMA57_FALSE}"; then
     11132  { { echo "$as_me:$LINENO: error: conditional \"BUILDMA57\" was never defined.
     11133Usually this means the macro was only invoked conditionally." >&5
     11134echo "$as_me: error: conditional \"BUILDMA57\" was never defined.
     11135Usually this means the macro was only invoked conditionally." >&2;}
     11136   { (exit 1); exit 1; }; }
     11137fi
    1069811138if test -z "${BUILDMC19_TRUE}" && test -z "${BUILDMC19_FALSE}"; then
    1069911139  { { echo "$as_me:$LINENO: error: conditional \"BUILDMC19\" was never defined.
     
    1072111161Usually this means the macro was only invoked conditionally." >&5
    1072211162echo "$as_me: error: conditional \"HAVE_MA27\" was never defined.
     11163Usually this means the macro was only invoked conditionally." >&2;}
     11164   { (exit 1); exit 1; }; }
     11165fi
     11166if test -z "${HAVE_MA57_TRUE}" && test -z "${HAVE_MA57_FALSE}"; then
     11167  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MA57\" was never defined.
     11168Usually this means the macro was only invoked conditionally." >&5
     11169echo "$as_me: error: conditional \"HAVE_MA57\" was never defined.
    1072311170Usually this means the macro was only invoked conditionally." >&2;}
    1072411171   { (exit 1); exit 1; }; }
     
    1139211839s,@BUILDMA27_TRUE@,$BUILDMA27_TRUE,;t t
    1139311840s,@BUILDMA27_FALSE@,$BUILDMA27_FALSE,;t t
     11841s,@BUILDMA57_TRUE@,$BUILDMA57_TRUE,;t t
     11842s,@BUILDMA57_FALSE@,$BUILDMA57_FALSE,;t t
    1139411843s,@BUILDMC19_TRUE@,$BUILDMC19_TRUE,;t t
    1139511844s,@BUILDMC19_FALSE@,$BUILDMC19_FALSE,;t t
     
    1140011849s,@HAVE_MA27_TRUE@,$HAVE_MA27_TRUE,;t t
    1140111850s,@HAVE_MA27_FALSE@,$HAVE_MA27_FALSE,;t t
     11851s,@HAVE_MA57_TRUE@,$HAVE_MA57_TRUE,;t t
     11852s,@HAVE_MA57_FALSE@,$HAVE_MA57_FALSE,;t t
    1140211853s,@HAVE_MC19_TRUE@,$HAVE_MC19_TRUE,;t t
    1140311854s,@HAVE_MC19_FALSE@,$HAVE_MC19_FALSE,;t t
  • branches/dev/configure.ac

    r537 r555  
    739739MY_CHECK_CXX_HEADER(assert)
    740740MY_CHECK_CXX_HEADER(stdio)
     741MY_CHECK_CXX_HEADER(stdlib)
    741742MY_CHECK_CXX_HEADER(stdarg)
    742743MY_CHECK_CXX_HEADER(float)
     
    10211022  fi
    10221023  MY_CHECK_HSLFILE(mc19ad,MC19)
     1024  MY_CHECK_HSLFILE(ma57ad,MA57)
    10231025else
    10241026  SAVE_LIBS="$LIBS"
     
    10351037  fi
    10361038  MY_CHECK_HSL([mc19ad],[MC19])
     1039  MY_CHECK_HSL([ma57ad],[MA57])
    10371040  LIBS="$use_hsl $SAVE_LIBS"
    10381041fi
     
    10901093  esac],[distconf=false])
    10911094
    1092 if test "$use_MA27" = "no" -a "$use_pardiso" = "no" -a "$use_taucs" = no; then
     1095if test "$use_MA27" = "no" -a "$use_MA57" = "no" -a "$use_pardiso" = "no" -a "$use_taucs" = no; then
    10931096  if test "$distconf" = false; then
    10941097    AC_MSG_ERROR("No linear solver (such as MA27) available")
     
    12941297fi
    12951298AM_CONDITIONAL([BUILDMA27],[test "$use_MA27" = BUILD])
     1299AM_CONDITIONAL([BUILDMA57],[test "$use_MA57" = BUILD])
    12961300AM_CONDITIONAL([BUILDMC19],[test "$use_MC19" = BUILD])
    12971301
     
    13011305
    13021306AM_CONDITIONAL([HAVE_MA27],[test ! "$use_MA27" = no])
     1307AM_CONDITIONAL([HAVE_MA57],[test ! "$use_MA57" = no])
    13031308AM_CONDITIONAL([HAVE_MC19],[test ! "$use_MC19" = no])
    13041309AM_CONDITIONAL([HAVE_PARDISO],[test ! "$use_pardiso" = no])
  • branches/dev/inc/config.h.in

    r524 r555  
    4242#undef HAVE_CSTDIO
    4343
     44/* Define to 1 if you have the <cstdlib> header file. */
     45#undef HAVE_CSTDLIB
     46
    4447/* Define to 1 if you have the <ctime> header file. */
    4548#undef HAVE_CTIME
     
    5962/* Define to 1 if MA27 is available */
    6063#undef HAVE_MA27
     64
     65/* Define to 1 if MA57 is available */
     66#undef HAVE_MA57
    6167
    6268/* Define to 1 if you have the <math.h> header file. */
Note: See TracChangeset for help on using the changeset viewer.