(offtopic: Purify and Valgrind) Re: [Coin-discuss] Purify UMR CoinFactorization::pivotOneOtherRow

Leo Lopes leo at sie.arizona.edu
Wed May 24 12:19:00 EDT 2006


I've used valgrind before, sparingly, but never purify. Do you guys have
experience with both? Comments on one versus the other?

TIA,
Leo.

On 5/23/06, John J Forrest <jjforre at us.ibm.com> wrote:
>
>
> That one is OK.  There used to be a define of ZEROFAULT if -g but it seems
> to have vanished.
>
> Just define ZEROFAULT and Purify should be happy.
>
> John
>
>
>  *"Matthew Galati" <Matthew.Galati at sas.com>*
> Sent by: coin-discuss-bounces at list.coin-or.org
>
> 05/24/2006 03:32 AM  Please respond to
> Discussions about open source software for Operations Research        <
> coin-discuss at list.coin-or.org>
>
>   To
> "Discussions about open source software for Operations Research" <
> coin-discuss at list.coin-or.org>  cc
>
>  Subject
> [Coin-discuss] Purify UMR CoinFactorization::pivotOneOtherRow
>
>
>
>
>
>
> I recall CLP ignoring some UMR's in past postings. This one comes up a lot
> - is it safe?
>
> Matt
>
>
>
> [I] Starting Purify'd
> C:\cygwin\home\magala\sasopt\cbuild\exemilpNET03\exemilp\Debug\exemilp.exe
> at 05/23/2006 21:27:41
> [I] Starting main
> [W] UMR: Uninitialized memory read in
> CoinFactorization::pivotOneOtherRow(int,int) {47 occurrences}
>        Reading 4 bytes from 0x038fda50 (4 bytes at 0x038fda50
> uninitialized)
>        Address 0x038fda50 is 11000 bytes into a 234016 byte block at
> 0x038faf58
>        Address 0x038fda50 points to a C++ new block in heap 0x00390000
>        Thread ID: 0xb4c
>        Error location
>            CoinFactorization::pivotOneOtherRow(int,int)
> [c:\cygwin\home\magala\coin\coin\coinfactorization1.cpp:1949]
>                        if ( i + 1 < endColumn ) {
>                #endif
>                          nextIRow = indexRowU_[i + 1];
>             =>           nextValue = elementU_[i + 1];
>                #ifdef ZEROFAULT
>                        }
>                #endif
>            CoinFactorization::factorSparse(void)
> [c:\cygwin\home\magala\coin\coin\coinfactorization2.cpp:322]
>                                break;
>                              }
>                            } else {
>             =>               if ( !pivotOneOtherRow ( pivotRow,
> pivotColumn ) ) {
>                                status = -99;
>                                count=biggerDimension_+1;
>                                break;
>            CoinFactorization::factor(void)
> [c:\cygwin\home\magala\coin\coin\coinfactorization1.cpp:980]
>                CoinFactorization::factor (  )
>                {
>                  //sparse
>             =>   status_ = factorSparse (  );
>                  switch ( status_ ) {
>                  case 0:            //finished
>                    totalElements_ = 0;
>            ClpFactorization::factorize(ClpSimplex *,int,bool)
> [c:\cygwin\home\magala\coin\clp\clpfactorization.cpp:361]
>                      preProcess ( 2 );
>                    else
>                      preProcess ( 3 ); // no row copy
>             =>     factor (  );
>                    if (status_==-99) {
>                      // get more memory
>                      areaFactor(2.0*areaFactor());
>            ClpSimplex::internalFactorize(int)
> [c:\cygwin\home\magala\coin\clp\clpsimplex.cpp:1395]
>                      exit(0);
>                    k++;
>                  }
>             =>   int status = factorization_->factorize(this,
> solveType,valuesPass);
>                  if (status) {
>                    handler_->message(CLP_SIMPLEX_BADFACTOR,messages_)
>                      <<status
>            ClpSimplexDual::statusOfProblemInDual(int&,int,double
> *,ClpDataSave&,int) [c:\cygwin\home\magala\coin\clp\clpsimplexdual.cpp:3292]
>                    dualRowPivot_->saveWeights(this,1);
>                    if (type) {
>                      // is factorization okay?
>             =>       if (internalFactorize(1)) {
>                    // no - restore previous basis
>                    unflagVariables = false;
>                    assert (type==1);
>            ClpSimplexDual::gutsOfDual(int,double *&,int,ClpDataSave&)
> [c:\cygwin\home\magala\coin\clp\clpsimplexdual.cpp:388]
>                    }
>                    // may factorize, checks if problem finished
>
>  statusOfProblemInDual(lastCleaned,factorType,saveDuals,data,
>             =>                           ifValuesPass);
>                    // If values pass then do easy ones on first time
>                    if (ifValuesPass&&
>                        progress_->lastIterationNumber(0)<0&&saveDuals) {
>            ClpSimplexDual::dual(int,int)
> [c:\cygwin\home\magala\coin\clp\clpsimplexdual.cpp:452]
>                  int initialStatus=problemStatus_;
>
>                  if (!returnCode)
>             =>     gutsOfDual(ifValuesPass,saveDuals,initialStatus,data);
>                  if (problemStatus_==10)
>                    startFinishOptions |= 1;
>                  finishSolve(startFinishOptions);
>            ClpSimplex::dual(int,int)
> [c:\cygwin\home\magala\coin\clp\clpsimplex.cpp:4408]
>
>                      As far as I can see this is perfectly safe.
>                  */
>             =>   int returnCode = ((ClpSimplexDual *)
> this)->dual(ifValuesPass, startFinishOptions);
>                  if
> ((specialOptions_&2048)!=0&&problemStatus_==10&&!numberPrimalInfeasibilities_
>                      &&sumDualInfeasibilities_<
> 1000.0*dualTolerance_&&perturbation_>=100)
>                    problemStatus_=0; // ignore
>            OsiClpSolverInterface::resolve(void)
> [c:\cygwin\home\magala\coin\osi\osiclp\osiclpsolverinterface.cpp:475]
>                        }
>                      } else {
>                     if((specialOptions_&1)==0) {
>             =>           modelPtr_->dual(0,startFinishOptions);
>                        } else {
>                          crunch();
>                        }
>        Allocation location
>            new(UINT)
>  [f:\vs70builds\3077\vc\crtbld\crt\src\newop.cpp:10]
>            <>=(UINT)
>  [f:\vs70builds\3077\vc\crtbld\crt\src\newaop.cpp:7]
>            CoinFactorization::getAreas(int,int,int,int)
> [c:\cygwin\home\magala\coin\coin\coinfactorization1.cpp:616]
>                    lengthAreaU_ =  (CoinBigIndex)
> (areaFactor_*lengthAreaU_);
>                    lengthAreaL_ =  (CoinBigIndex)
> (areaFactor_*lengthAreaL_);
>                  }
>             =>   elementU_ = new double [ lengthAreaU_ ];
>                  indexRowU_ = new int [ lengthAreaU_ ];
>                  indexColumnU_ = new int [ lengthAreaU_ ];
>                  elementL_ = new double [ lengthAreaL_ ];
>            ClpFactorization::factorize(ClpSimplex *,int,bool)
> [c:\cygwin\home\magala\coin\clp\clpfactorization.cpp:315]
>                #else
>                    getAreas ( numberRows,
>                           numberRowBasic+numberColumnBasic,
> numberElements,
>             =>            2 * numberElements );
>                #endif
>                    //fill
>                    // Fill in counts so we can skip part of preProcess
>            ClpSimplex::internalFactorize(int)
> [c:\cygwin\home\magala\coin\clp\clpsimplex.cpp:1395]
>                      exit(0);
>                    k++;
>                  }
>             =>   int status = factorization_->factorize(this,
> solveType,valuesPass);
>                  if (status) {
>                    handler_->message(CLP_SIMPLEX_BADFACTOR,messages_)
>                      <<status
>            ClpSimplexDual::statusOfProblemInDual(int&,int,double
> *,ClpDataSave&,int) [c:\cygwin\home\magala\coin\clp\clpsimplexdual.cpp:3292]
>                    dualRowPivot_->saveWeights(this,1);
>                    if (type) {
>                      // is factorization okay?
>             =>       if (internalFactorize(1)) {
>                    // no - restore previous basis
>                    unflagVariables = false;
>                    assert (type==1);
>            ClpSimplexDual::gutsOfDual(int,double *&,int,ClpDataSave&)
> [c:\cygwin\home\magala\coin\clp\clpsimplexdual.cpp:388]
>                    }
>                    // may factorize, checks if problem finished
>
>  statusOfProblemInDual(lastCleaned,factorType,saveDuals,data,
>             =>                           ifValuesPass);
>                    // If values pass then do easy ones on first time
>                    if (ifValuesPass&&
>                        progress_->lastIterationNumber(0)<0&&saveDuals) {
>            ClpSimplexDual::dual(int,int)
> [c:\cygwin\home\magala\coin\clp\clpsimplexdual.cpp:452]
>                  int initialStatus=problemStatus_;
>
>                  if (!returnCode)
>             =>     gutsOfDual(ifValuesPass,saveDuals,initialStatus,data);
>                  if (problemStatus_==10)
>                    startFinishOptions |= 1;
>                  finishSolve(startFinishOptions);
>            ClpSimplex::dual(int,int)
> [c:\cygwin\home\magala\coin\clp\clpsimplex.cpp:4408]
>
>                      As far as I can see this is perfectly safe.
>                  */
>             =>   int returnCode = ((ClpSimplexDual *)
> this)->dual(ifValuesPass, startFinishOptions);
>                  if
> ((specialOptions_&2048)!=0&&problemStatus_==10&&!numberPrimalInfeasibilities_
>                      &&sumDualInfeasibilities_<
> 1000.0*dualTolerance_&&perturbation_>=100)
>                    problemStatus_=0; // ignore
>            OsiClpSolverInterface::resolve(void)
> [c:\cygwin\home\magala\coin\osi\osiclp\osiclpsolverinterface.cpp:475]
>                        }
>                      } else {
>                     if((specialOptions_&1)==0) {
>             =>           modelPtr_->dual(0,startFinishOptions);
>                        } else {
>                          crunch();
>                        }
>
>
>
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
>
>


-- 
========================================================================
Leonardo B. Lopes                                    leo at sie.arizona.edu
Assistant Professor                                        (520)621-2342
SIE - University of Arizona  http://www.sie.arizona.edu/faculty/leolopes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060524/ca4ee3de/attachment.html>


More information about the Coin-discuss mailing list