In my local build I added the following *printf* statements: int ibdsav;
* printf( "DEBUG: altmov_: ibdsav initialized to %d = 0x%X\n", ibdsav, ibdsav ); fflush(stdout);*... if (k == *kopt) { *printf( "DEBUG: altmov_: goto L80 invoked in outer loop.\n" ); fflush(stdout);* goto L80; } ... *printf( "DEBUG: altmov_: predsq = %g, predsav = %g.\n", predsq, presav ); fflush(stdout);* if (predsq > presav) { presav = predsq; ksav = k; stpsav = step; ibdsav = isbd; *printf( "DEBUG: altmov_: ibdsav set to %d = 0x%X inside if(predsq>presav)\n", ibdsav, ibdsav ); fflush(stdout);* } ... *printf( "DEBUG: altmov_: before changing xnew ibdsav was %d = 0x%X\n", ibdsav, ibdsav ); fflush(stdout);* if (ibdsav < 0) { xnew[-ibdsav] = sl[-ibdsav]; } if (ibdsav > 0) { xnew[ibdsav] = su[ibdsav]; } The printout suggests that the cause is that the initial value of ibdsav has not been set before it was used as an array index: ... DEBUG: altmov_: ibdsav initialized to 1072693248 = 0x3FF00000 DEBUG: altmov_: goto L80 invoked in outer loop. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: predsq = -nan, predsav = 0. DEBUG: altmov_: before changing xnew ibdsav was 1072693248 = 0x3FF00000 That caused application to crash: Exiting due to signal #11: Segmentation fault ... :frame: 0x2b6681724fc9 ...b/libnlopt_cxx.so.0 bobyqa(int, int, double*, double const*, double const*, double const*, nlopt_stopping*, double*, double (*)(unsigned int, double const*, double*, void*), void*) Please fix this by initializing the value of ibdsav before use: int ibdsav* = 0*; Thanks, Michael
_______________________________________________ NLopt-discuss mailing list NLopt-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss