(offtopic: Purify and Valgrind) Re: [Coin-discuss] Purify UMRCoinFactorization::pivotOneOtherRow
Matthew Galati
Matthew.Galati at sas.com
Wed May 24 13:16:38 EDT 2006
I've used both and don't have a strong preference either way.
In the past, valgrind has a tendency to seg-fault randomly, and sometimes it gives back false positives - or, at least, I have searched high and low and cannot find the reason for a memcheck warning/error. Purify has never given me a false positive - I think its an excellent product. Quantify (part of the Rational Purify Plus suite) is also an excellent product for profiling. I have not found anything that comes even close to Quantify.
Purify includes a nice GUI with some interactive features, which also makes it slightly better than valgrind. Purify/Quantify also integrate nicely with Visual Studio. That being said, Purify/Quantify costs $$ and valgrind is free.
Matt
________________________________
From: coin-discuss-bounces at list.coin-or.org [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of Leo Lopes
Sent: Wednesday, May 24, 2006 12:19 PM
To: Discussions about open source software for Operations Research
Subject: (offtopic: Purify and Valgrind) Re: [Coin-discuss] Purify UMRCoinFactorization::pivotOneOtherRow
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/e3e70840/attachment.html>
More information about the Coin-discuss
mailing list