Changeset 102


Ignore:
Timestamp:
Nov 1, 2006 3:14:37 PM (12 years ago)
Author:
pbonami
Message:

Fixes filter interface for 64bits architectures
Small fix in Bcp makefile

Location:
branches/devel/Bonmin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Bonmin/experimental/Bcp/Makefile.am

    r85 r102  
    4949
    5050amplsolver.a:
     51        rm -rf solvers
    5152        mkdir -p solvers ; \
    5253        cd solvers ; \
     
    7071        done ; \
    7172        sed -e 's/CFLAGS =/CFLAGS = -DNO_FUNCADD/g' $(AMPL_SRC)/makefile.u > makefile.u ; \
    72         $(MAKE) -f makefile.u ; \
     73        eval `grep ASLMAKEFLAGS ../../../../ThirdParty/ASL/config.log | tail -1`; \
     74        $(MAKE) $$ASLMAKEFLAGS -f makefile.u ; \
    7375        cp amplsolver.a ..
    7476
     
    124126########################################################################
    125127
    126 CLEANFILES = $(LIBCBCCOPY)
     128CLEANFILES = $(LIBCBCCOPY) amplsolver.a
    127129
    128130DISTCLEANFILES =
  • branches/devel/Bonmin/experimental/Bcp/Makefile.in

    r85 r102  
    373373#                         make distclean stuff                         #
    374374########################################################################
    375 CLEANFILES = $(LIBCBCCOPY)
     375CLEANFILES = $(LIBCBCCOPY) amplsolver.a
    376376DISTCLEANFILES =
    377377all: all-am
     
    653653
    654654amplsolver.a:
     655        rm -rf solvers
    655656        mkdir -p solvers ; \
    656657        cd solvers ; \
     
    674675        done ; \
    675676        sed -e 's/CFLAGS =/CFLAGS = -DNO_FUNCADD/g' $(AMPL_SRC)/makefile.u > makefile.u ; \
    676         $(MAKE) -f makefile.u ; \
     677        eval `grep ASLMAKEFLAGS ../../../../ThirdParty/ASL/config.log | tail -1`; \
     678        $(MAKE) $ASLMAKEFLAGS -f makefile.u ; \
    677679        cp amplsolver.a ..
     680        rm -rf solvers
    678681# Tell versions [3.59,3.63) of GNU make to not export all variables.
    679682# Otherwise a system limit (for SysV at least) may be exceeded.
  • branches/devel/Bonmin/src/Interfaces/Filter/BonFilterSolver.cpp

    r101 r102  
    151151  // Convert a sparse matrix from triplet format to row ordered packed matrix
    152152  void TMat2RowPMat(int n, int m, int nnz, int * iRow, int* iCol, int * permutation2,
    153                     long int * lws, int offset)
     153                    fint * lws, int offset)
    154154  {
    155155    for(int i = 0 ; i < nnz ; i++)
     
    165165    fint row = 1;
    166166    lws[0] = nnz + offset + 1;
    167     long int * inds = lws + 1;
    168     long int * start = inds + nnz + offset + 1;
     167    fint * inds = lws + 1;
     168    fint * start = inds + nnz + offset + 1;
    169169   
    170170    for(fint i = 0 ; i < nnz ; i++)
     
    184184  // Convert a sparse matrix from triplet format to row ordered packed matrix
    185185  void TMat2ColPMat(int n, int m, int nnz, int * iRow, int* iCol,
    186                     long int * lws, int offset)
     186                    fint * lws, int offset)
    187187  {
    188188    fint col = 1;
    189189    lws[0] = nnz + offset + 1;
    190     long int * inds = lws + 1;
    191     long int * start = inds + nnz + offset;
     190    fint * inds = lws + 1;
     191    fint * start = inds + nnz + offset;
    192192   
    193193    Transposer lt;
     
    348348
    349349  Ipopt::TNLP::IndexStyleEnum index_style;
    350   tnlp->get_nlp_info((Ipopt::Index&) n,(Ipopt::Index&) m,
    351                      (Ipopt::Index&) nnz_jac_g, (Ipopt::Index&) nnz_h_,
     350  Ipopt::Index nv, nc, nnz_j, nnz_hess;
     351  tnlp->get_nlp_info( nv, nc,
     352                     nnz_j, (Ipopt::Index&) nnz_hess,
    352353                     index_style);
     354  n = nv;
     355  m = nc;
     356  nnz_jac_g = nnz_j;
     357  nnz_h_ = nnz_hess;
    353358
    354359  nnz_h = nnz_h_;
     
    356361
    357362  // 1.b) then from options
    358   options->GetIntegerValue("kmax", (Ipopt::Index&) kmax, "filter.");
     363  Ipopt::Index kmax_ipt;
     364  options->GetIntegerValue("kmax", kmax_ipt, "filter.");
     365  kmax = kmax_ipt;
    359366  kmax = min(kmax,n);
    360   options->GetIntegerValue("mlp", (Ipopt::Index&) mlp,"filter.");
    361 
    362   options->GetIntegerValue("maxf",(Ipopt::Index&) maxf,"filter.");
     367  Ipopt::Index mlp_ipt;
     368  options->GetIntegerValue("mlp", mlp_ipt,"filter.");
     369  mlp = mlp_ipt;
     370
     371  Ipopt::Index  maxf_ipt;
     372  options->GetIntegerValue("maxf", maxf_ipt,"filter.");
     373  maxf = maxf_ipt;
    363374
    364375  fint mxwk0;
    365   options->GetIntegerValue("mxws", (Ipopt::Index&) mxwk0, "filter.");
     376  Ipopt::Index mxwk0_ipt;
     377  options->GetIntegerValue("mxws", mxwk0_ipt, "filter.");
     378  mxwk0 = mxwk0_ipt;
    366379
    367380  fint mxiwk0;
    368   options->GetIntegerValue("mxlws", (Ipopt::Index&) mxiwk0, "filter.");
    369 
     381  Ipopt::Index mxiwk0_ipt;
     382  options->GetIntegerValue("mxlws",  mxiwk0_ipt, "filter.");
     383  mxiwk0 = mxiwk0_ipt;
    370384  // Setup storage for Filter
    371385  double infty = nlp_eps_inf__.infty;
     
    403417  for(fint i = 1; i <= n ; i++)
    404418    la[i] = i;// - (index_style == Ipopt::TNLP::C_STYLE);
    405   tnlp->eval_jac_g( (int) n, NULL, 0,(int) m , (int) nnz_jac_g,  RowJac,  ColJac, NULL);
     419  tnlp->eval_jac_g(  nv, NULL, 0, nc , nnz_j,  RowJac,  ColJac, NULL);
    406420
    407421  permutationJac = permutationJac_ = new int [nnz_jac_g];
  • branches/devel/Bonmin/src/Interfaces/Filter/BonFilterSolver.hpp

    r101 r102  
    3737
    3838
    39     typedef long fint;
     39    typedef ipfint fint;
    4040    typedef double real;
    4141
Note: See TracChangeset for help on using the changeset viewer.