Originally posted by: SystemAdmin
Hello, I've ported the code over to linux and ran the code. It now appears that the value of the status variable is 0 after the "status = CPXsetdblparam(env, CPX_PARAM_SOLNPOOLGAP, 0.24);" call. I am not sure why that was occurring yesterday, other than perhaps it was an issue with the VS2010 debugger (I'm now directly printing out to the console the value of the status variable).
So on linux I can reproduce the same strange error, where certain values for the solution pool's relative gap work fine (the code finishes normally), while others end abnormally (a segmentation fault). It appears that this is occurring in my call to CPXpopulate.
I also took the liberty to run valgrind on this code as follows: valgrind --leak-check=yes --log-file=valgrind.log ./VAPS_GP
which produced:
**********************
==3198==
==3198== HEAP SUMMARY:
==3198== in use at exit: 1,428 bytes in 6 blocks
==3198== total heap usage: 189 allocs, 183 frees, 370,937 bytes allocated
==3198==
==3198== Searching for pointers to 6 not-freed blocks
==3198== Checked 257,220 bytes
==3198==
==3198== 128 bytes in 1 blocks are definitely lost in loss record 1 of 2
==3198== at 0x4024106: memalign (vg_replace_malloc.c:581)
==3198== by 0x4024163: posix_memalign (vg_replace_malloc.c:709)
==3198== by 0x81B4E8A: _964c26aaa0b1aa887c1c6e88f7857cb8 (in /home/.../Project)
==3198== by 0x42FD867: ???
==3198==
==3198== 1,300 bytes in 5 blocks are definitely lost in loss record 2 of 2
==3198== at 0x4024F20: malloc (vg_replace_malloc.c:236)
==3198== by 0x85E8121: uprv_malloc_44_cplex (in /home/.../Project)
==3198==
==3198== LEAK SUMMARY:
==3198== definitely lost: 1,428 bytes in 6 blocks
==3198== indirectly lost: 0 bytes in 0 blocks
==3198== possibly lost: 0 bytes in 0 blocks
==3198== still reachable: 0 bytes in 0 blocks
==3198== suppressed: 0 bytes in 0 blocks
==3198==
==3198== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 20 from 7)
3198 3198 used_suppression: 20 dl-hack3-cond-1
==3198==
==3198== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 20 from 7)
**********************
#CPLEXOptimizers#DecisionOptimization