Changeset 2345


Ignore:
Timestamp:
Oct 3, 2017 7:36:45 AM (12 months ago)
Author:
forrest
Message:

ampl with COIN_BIG_INDEX

Location:
trunk/Cbc/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcLinked.cpp

    r2344 r2345  
    52845284    y = CoinMin(y, yB[1]);
    52855285    int j;
    5286 #ifndef NDEBUG
     5286    // seems something wrong here
     5287#if 0 //ndef NDEBUG
    52875288    double xLambda = 0.0;
    52885289    double yLambda = 0.0;
  • trunk/Cbc/src/CbcSolver.cpp

    r2344 r2345  
    15051505                if (!coinModel) {
    15061506#endif
    1507                     solver->loadProblem(info.numberColumns, info.numberRows, info.starts,
     1507                    solver->loadProblem(info.numberColumns, info.numberRows,
     1508                                        reinterpret_cast<const CoinBigIndex *>(info.starts),
    15081509                                        info.rows, info.elements,
    15091510                                        info.columnLower, info.columnUpper, info.objective,
  • trunk/Cbc/src/Cbc_ampl.cpp

    r2035 r2345  
    422422    if (!(nlvc + nlvo) && nonLinearType < 10) {
    423423        /* read linear model*/
     424#if COIN_BIG_INDEX==2
     425        f_read(nl, ASL_allow_Z|ASL_use_Z);
     426#else
    424427        f_read(nl, 0);
     428#endif
    425429        // see if any sos
    426430        if (true) {
     
    505509        info->columnLower = columnLower;
    506510        info->columnUpper = columnUpper;
     511#if COIN_BIG_INDEX==0
    507512        info->starts = A_colstarts;
     513#else
     514        info->starts = A_colstartsZ;
     515#endif
    508516        /*A_colstarts=NULL;*/
    509517        info->rows = A_rownos;
     
    885893        rsd = suf_iput("sstatus", ASL_Sufkind_con, rowStatus);
    886894        /* read linear model*/
     895#if COIN_BIG_INDEX==2
     896        f_read(nl, ASL_allow_Z|ASL_use_Z);
     897#else
    887898        f_read(nl, 0);
     899#endif
    888900        // see if any sos
    889901        if (true) {
     
    9901002#endif
    9911003        }
     1004#if COIN_BIG_INDEX==0
    9921005        CoinPackedMatrix columnCopy(true, numberRows, numberColumns, numberElements,
    9931006                                    A_vals, A_rownos, A_colstarts, NULL);
     1007#else
     1008        CoinPackedMatrix columnCopy(true, numberRows, numberColumns, numberElements,
     1009                                    A_vals, A_rownos,
     1010                                    reinterpret_cast<const CoinBigIndex *>(A_colstartsZ), NULL);
     1011#endif
    9941012        matrixByRow.reverseOrderedCopyOf(columnCopy);
    9951013    } else if (nonLinear == 1) {
  • trunk/Cbc/src/Cbc_ampl.h

    r1573 r2345  
    2626    double * columnLower;
    2727    double * columnUpper;
     28#if COIN_BIG_INDEX==0
    2829    int * starts;
     30#else
     31    long unsigned int * starts;
     32#endif
    2933    int * rows;
    3034    double * elements;
  • trunk/Cbc/src/CoinSolve.cpp

    r1607 r2345  
    297297#endif
    298298
     299/*
     300  Somehow with some BLAS we get multithreaded by default
     301  For 99.99% of problems this is not a good idea.
     302  The openblas_set_num_threads(1) seems to work even with other blas
     303 */
     304#if CLP_USE_OPENBLAS
     305extern "C"
     306{
     307  void openblas_set_num_threads(int num_threads);
     308}
     309#endif
    299310int main (int argc, const char *argv[])
    300311{
     
    306317#ifndef CBC_OTHER_SOLVER
    307318        OsiClpSolverInterface solver1;
     319#if CLP_USE_OPENBLAS
     320        openblas_set_num_threads(CLP_USE_OPENBLAS);
     321#endif 
    308322#elif CBC_OTHER_SOLVER==1
    309323        OsiCpxSolverInterface solver1;
Note: See TracChangeset for help on using the changeset viewer.