sent from cell On Aug 30, 2012 12:43 PM, "Brian Hawkins" <[email protected]> wrote: > > Stephen, > > The set routine does little more than call the objective function at the > initial guess x0 and at x0+dx for each dx in the initial step sizes. Have > you verified that the MPI objective function works with these parameters? > Is there any diagnostic information besides a missing print output (e.g., > segfault or backtrace).
I have verified that the mpi objective works but I think I can be more systematic about it. > > As an aside, I see lots of vector alloc calls but none to free. Are you > using some C++ wrapper for GSL? > No, I just need to add those :-) > Regards, > Brian > > On Thu, Aug 30, 2012 at 9:00 AM, <[email protected]> wrote: > > > > > > Hello, > > > > I am working on a project using GSL to minimize a function, where this > > function calls MPI to do the actual computation. I have both an MPI and a > > non-MPI version of the objective function. When I use the non-MPI version, > > everything seems to work. However, when I use the MPI version, > > gsl_multimin_fminimizer_set fails to run ("passed set" never prints) > > > > cout << "GSL: " << "Starting minimizer" << endl; > > S = gsl_multimin_fminimizer_alloc(T, MODEL_VALUE_COUNT); > > cout << "GSL: passed alloc" << endl; > > gsl_multimin_fminimizer_set(S, &MinexFunc, StartVec, StepVec); > > cout << "GSL: passed set" << endl; > > > > The full code is available at https://gist.github.com/3522278 > > > > The non-mpi version code from 596 to 613 runs just as I would want it to. > > However, the MPI equivalent (lines 622 to 650) do not. I would really > > appreciate some feedback as to why this isn't working as I would expect. I > > know that the mpi objective function (nll_mpi, which is wrapped by > > SolveEnergy). > > > > Thanks, > > Stephen > >
