[Coin-lpsolver] g++ seg. fault compiling Clp
Kish Shen
ks15 at icparc.ic.ac.uk
Mon Aug 1 14:20:36 EDT 2005
Hi,
I downloaded various COIN-OR components last week, from the 28 July 2005
tarballs. I was able to compile the components with g++ 3.2.2 (on Linux),
but unfortunately I am unable to run this on most of our Linux machines on
our network, which have older versions of Linux (missing libraries, etc.).
I then tried to compile COIN-OR on this older Linux:
worm: g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
worm: uname -a
Linux worm.icparc.ic.ac.uk 2.4.18-18.7.X-perfctr #2 Tue Dec 10 12:15:10 GMT 2002 i686 unknown
which should have a sufficiently recent g++, according to the INSTALL.
However, I ran into several problems, some of which I was able to work
around, but on trying to compile Clp, I got a segmentation error, with the
following message:
Compiling ClpSimplexNonlinear.cpp
ClpSimplexNonlinear.cpp: In method `int
ClpSimplexNonlinear::pivotColumn (CoinIndexedVector *,
CoinIndexedVector *, CoinIndexedVector *, CoinIndexedVector *, int &,
double &, double *)':
ClpSimplexNonlinear.cpp:2366: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make[2]: *** [Linux-O/ClpSimplexNonlinear.o] Error 2
Thinking this is a g++ problem, I then tried to simplify the code in
ClpSimplexNonlinear.cpp, and the following seem to be the minimal code that
will generate a seg fault:
int
ClpSimplexNonlinear::pivotColumn(CoinIndexedVector * longArray,
CoinIndexedVector * rowArray,
CoinIndexedVector * columnArray,
CoinIndexedVector * spare,
int & pivotMode,
double & solutionError,
double * dArray)
{
// say not optimal
int numberTotal = numberRows_+numberColumns_;
// big big loop
double * work=0;
memcpy(dArray,work,numberTotal*sizeof(double));
int nFlagged=0;
for (;;) {
switch(getStatus(0)) {
case basic:
case ClpSimplex::isFixed:
break;
case atUpperBound:
case atLowerBound:
if (dj_[0])
nFlagged++;
break;
}
}
}
I get a different error message in this case:
Compiling ClpSimplexNonlinear.cpp
include/ClpModel.hpp: In method `int ClpSimplexNonlinear::pivotColumn
(CoinIndexedVector *, CoinIndexedVector *, CoinIndexedVector *,
CoinIndexedVector *, int &, double &, double *)':
include/ClpModel.hpp:864: Internal error: Segmentation fault.
and line 864 of ClpModel.hpp is:
std::vector<std::string> rowNames_;
Any ideas how I can work around this?
On a slightly different topic: is there some way I can find out the Clp
version from the source files? I was trying to find it so that I can report
the version of Clp I am using.
Thanks in advance for any information/help!
Yours sincerely,
Kish Shen
More information about the Clp
mailing list