Revision 1108 trunk/src/nh99/profmin.cpp

profmin.cpp (revision 1108)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7
#include <admodel.h>
8 8

  
......
47 47
    cout << "Error in im" << endl;
48 48
    ad_exit(1);
49 49
  }
50
 
50

  
51 51
  dvar_matrix fslave=get_f_from_slaves();
52 52
  vf+=sum(fslave);
53 53
  f=value(vf);
......
142 142
          check_pvm_message(1,1);
143 143
        }
144 144
      }
145
     
145

  
146 146
      gradient_structure::set_NO_DERIVATIVES();
147 147
      check_pvm_message(1,1);
148
 
149 148

  
150 149
      int break_flag=38;
151 150
      send_int_to_slaves(break_flag);
......
166 165
        cout << "Error in im" << endl;
167 166
        ad_exit(1);
168 167
      }
169
 
168

  
170 169
      dvar_matrix fslave=get_f_from_slaves();
171 170
      double tv=value(likeprof_params::likeprofptr[iprof]->variable());
172 171
      fprof+=value(*objective_function_value::pobjfun);
......
198 197
    int max_profile_phases=3;
199 198
    int profile_phase=1;
200 199
    initial_params::current_phase = initial_params::max_number_phases;
201
    do 
200
    do
202 201
    {
203 202
      int prof_flag=get_int_from_master();
204 203
      if (prof_flag && prof_flag !=5)
......
224 223
          grad_chk();
225 224
        }
226 225
        while(1);
227
  
226

  
228 227
        int break_flag=get_int_from_master();
229 228
        if (break_flag)
230 229
        {
231 230
          cout << break_flag << endl;
232 231
        }
233 232
        gradient_structure::set_NO_DERIVATIVES();
234
  
233

  
235 234
        pvm_slave_function_evaluation_noder();
236
 
235

  
237 236
      }
238 237
    }
239 238
    while(1);

Also available in: Unified diff