Revision 752 branches/threaded2/src/nh99/xxmcmc.cpp

xxmcmc.cpp (revision 752)
6 6
 */
7 7

  
8 8

  
9
#include <thread>
10
#include <sstream>
11
#include <cassert>
9 12
#include <admodel.h>
10 13

  
11 14

  
......
254 257
      }
255 258
      if (use_empirical_flag)
256 259
      { 
257
        read_empirical_covariance_matrix(nvar,S,ad_comm::adprogram_name);
260
        read_empirical_covariance_matrix(nvar, S, *ad_comm::adprogram_name);
258 261
      }
259 262
      else if (!rescale_bounded_flag)
260 263
      {
......
266 269
        else
267 270
        {
268 271
          int tmp_nvar;
269
          adstring tmpstring = ad_comm::adprogram_name + ".bgs";
272
          adstring tmpstring = *ad_comm::adprogram_name + ".bgs";
270 273
          uistream uis((char*)(tmpstring));
271 274
          if (!uis)
272 275
          {
......
328 331
  
329 332
    dmatrix symbds(1,2,1,nvar);
330 333
    initial_params::set_all_simulation_bounds(symbds);
331
    ofstream ofs_sd1((char*)(ad_comm::adprogram_name + adstring(".mc2")));
334
    ofstream ofs_sd1((char*)(*ad_comm::adprogram_name + adstring(".mc2")));
332 335
  
333 336
    {
334 337
      long int iseed=0;
......
506 509
       if (!restart_flag)
507 510
       {
508 511
         pofs_sd = 
509
           new uostream((char*)(ad_comm::adprogram_name + adstring(".mcm")));
512
           new uostream((char*)(*ad_comm::adprogram_name + adstring(".mcm")));
510 513
       }
511 514

  
512 515
      int mcsave_flag=0;
......
527 530
          {
528 531
            // check that nvar is correct
529 532
            {
530
              uistream uis((char*)(ad_comm::adprogram_name + adstring(".psv")));
533
              uistream uis((char*)(*ad_comm::adprogram_name + adstring(".psv")));
531 534
              if (!uis)
532 535
              {
533 536
                cerr << "Error trying to open file" << 
534
                  ad_comm::adprogram_name + adstring(".psv") <<
537
                  *ad_comm::adprogram_name + adstring(".psv") <<
535 538
                  " for mcrestart" <<   endl;
536 539
                cerr << " I am starting a new file " << endl;
537 540
                psvflag=1;
......
543 546
                if (nv1 !=nvar)
544 547
                {
545 548
                  cerr << "wrong number of independent variables in" <<
546
                    ad_comm::adprogram_name + adstring(".psv") <<
549
                    *ad_comm::adprogram_name + adstring(".psv") <<
547 550
                  cerr << " I am starting a new file " << endl;
548 551
                  psvflag=1;
549 552
                }
......
553 556
            if (!psvflag) {
554 557
              pofs_psave=
555 558
                new uostream(
556
                  (char*)(ad_comm::adprogram_name + adstring(".psv")),ios::app);
559
                  (char*)(*ad_comm::adprogram_name + adstring(".psv")),ios::app);
557 560
            } else {
558 561
              pofs_psave=
559
                new uostream((char*)(ad_comm::adprogram_name + adstring(".psv")));
562
                new uostream((char*)(*ad_comm::adprogram_name + adstring(".psv")));
560 563
            }
561 564
                         
562 565
          } else {
563 566
            pofs_psave=
564
              new uostream((char*)(ad_comm::adprogram_name + adstring(".psv")));
567
              new uostream((char*)(*ad_comm::adprogram_name + adstring(".psv")));
565 568
          }
566 569
          if (!pofs_psave|| !(*pofs_psave))
567 570
          {
568 571
            cerr << "Error trying to open file" << 
569
              ad_comm::adprogram_name + adstring(".psv") << endl;
572
              *ad_comm::adprogram_name + adstring(".psv") << endl;
570 573
            mcsave_flag=0;
571 574
            if (pofs_psave)
572 575
            {
......
868 871
    }
869 872
             
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff