Originally posted by: EdKlotz
>
> Dear All,
>
> I try to install and use CPLEX 12.4 (the academic initiative version). I program with Cplex Class API in MATLAB. It works well for some models, such as the examples within the distribution.
> However, when I implement my own model (which is a mixed-integer second order cone program, MISOCP), I always get the error message: "Segmentation Violation Detected".
And does this error message occur after you see output indicating that CPLEX has started to solve
the problem, or does it appear to occur before the optimization even starts? In either case,
just before the Cplex.solve() call, insert a call to Cplex.writeModel to generate a binary SAV file
of the model. Then read it into interactive CPLEX, turn on the datacheck parameter ('set read
datacheck yes'), and try to solve it from there. If you can reproduce the crash there but don't
get any errors indicating invalid data, upload the SAV file to this forum thread so we can have a
look. If the datacheck parameter indicates some sort of invalid problem data array, hopefully
you can trace that back to the problem data arrays you specified in MATLAB. In particular, be
careful to make sure that your MATLAB arrays have the right dimension. For example, if you
inadvertently initialize the rhs array so it has fewer entries than the number of constraints,
CPLEX will access uninitialized memory to complete the array values, which can lead to unpredictable
results, including segmentation faults.
Ed
> I have tried the MATLAB versions R2008a, R2009b, 2010a, on both Windows and Linux systems. On the >other hand, it works well in solving the continuous relaxations of the MISOCP.
>
> Is there anyone who faces a similar problem?
> Are there special requirements on the MATLAB version for CPLEX 12.4?
> What's the common cause for such a Segmentation Violation problem?
> How can I fix it?
>
>
> Thank you in advance!
>
>
> Yong Cheng
>
yong.cheng@nt.tu-darmstadt.de#CPLEXOptimizers#DecisionOptimization