Revision 1971 trunk/src/nh99/modspmin.cpp

modspmin.cpp (revision 1971)
207 207
            // set this flag so that variables only needed for their std devs
208 208
            // will be calculated
209 209
            initial_params::sd_phase=1;
210
#if defined(USE_ADPVM)
210 211
            if (ad_comm::pvm_manager)
211 212
            {
212
  #if defined(USE_ADPVM)
213 213
              if (ad_comm::pvm_manager->mode==1)  //master
214 214
              {
215 215
                depvars_routine();
......
219 219
                  sd_routine();
220 220
                }
221 221
              }
222
  #else
223
              {
224
                cerr << "PVM not included with this distribution" << endl;
225
                ad_exit(1);
226
              }
227
  #endif
228 222
            }
229 223
            else
224
#endif
230 225
            {
231 226
              depvars_routine();
232 227
              hess_inv();
......
246 241
            {
247 242
              if (likeprof_params::num_likeprof_params)
248 243
              {
249
                if (!ad_comm::pvm_manager)
244
    #if defined(USE_ADPVM)
245
                if (ad_comm::pvm_manager)
250 246
                {
251
                  likeprof_routine(ffbest);
247
                  switch (ad_comm::pvm_manager->mode)
248
                  {
249
                  case 1: // master
250
                    likeprof_routine(ffbest);
251
                    break;
252
                  case 2: // slave
253
                    pvm_slave_likeprof_routine();
254
                    break;
255
                  default:
256
                    cerr << "error illega value for pvm_manager->mode" << endl;
257
                    exit(1);
258
                  }
252 259
                }
253 260
                else
254
    #if defined(USE_ADPVM)
255
                switch (ad_comm::pvm_manager->mode)
261
    #endif
256 262
                {
257
                case 1: // master
258 263
                  likeprof_routine(ffbest);
259
                break;
260
                case 2: // slave
261
                  pvm_slave_likeprof_routine();
262
                  break;
263
                default:
264
                  cerr << "error illega value for pvm_manager->mode" << endl;
265
                  exit(1);
266 264
                }
267
    #else
268
                cerr << "PVM not included with this distribution" << endl;
269
                ad_exit(1);
270
    #endif
271 265
              }
272 266
            }
273 267
            int nopt=0;
......
284 278
              else
285 279
                mcmc2_flag=0;
286 280

  
287
              if (!ad_comm::pvm_manager)
281
 #if defined(USE_ADPVM)
282
              if (ad_comm::pvm_manager)
288 283
              {
289
                mcmc_computations();
290
              }
291
              else
292
              {
293
    #if defined(USE_ADPVM)
294 284
                switch (ad_comm::pvm_manager->mode)
295 285
                {
296 286
                case 1: // master
......
303 293
                  cerr << "error illega value for pvm_manager->mode" << endl;
304 294
                  exit(1);
305 295
                }
306
    #else
307
                cerr << "PVM not included with this distribution" << endl;
308
                ad_exit(1);
309
    #endif
310 296
              }
297
              else
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff