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

getbigs.cpp (revision 752)
8 8
 * \file
9 9
 * Description not yet available.
10 10
 */
11
#include <thread>
12
#include <sstream>
13
#include <cassert>
11 14
#if defined(USE_LAPLACE)
12 15
#  include <df1b2fun.h>
13 16
#endif
......
21 24
  dmatrix& S,dmatrix& BS,dvector& scale)
22 25
{ 
23 26
  dmatrix tv(1,ndvar,1,nvar1);
24
  adstring tmpstring="admodel.dep";
25
  if (ad_comm::wd_flag)
26
     tmpstring = ad_comm::adprogram_name + ".dep";
27
  cifstream cif((char*)tmpstring);
28 27

  
28
  std::thread::id this_thread_id = std::this_thread::get_id();
29
  std::ostringstream oss2;
30
  oss2 << *ad_comm::adprogram_name << this_thread_id << ".dep";
31
  cifstream cif(oss2.str().c_str());
32

  
29 33
  int tmp_nvar,tmp_ndvar;
30 34
  cif >> tmp_nvar >> tmp_ndvar;
31
  if (tmp_nvar!=nvar1)
32
  {
33
    cerr << " tmp_nvar != nvar1 in file " << tmpstring
34
           << endl;
35
    ad_exit(1);
36
  }
35
  assert(tmp_nvar == nvar1);
37 36

  
38

  
39 37
#if defined(USE_LAPLACE)
40 38

  
41 39
    int us=nvar1-nvar;
......
48 46
    // get l_uu and l_xu for covariance calculations
49 47
    if (lapprox->hesstype !=2)
50 48
    {
51
      tmpstring = ad_comm::adprogram_name + ".luu";
49
      adstring tmpstring = *ad_comm::adprogram_name + ".luu";
52 50
      uistream ifs1((char*)(tmpstring));
53 51
      ifs1 >> usize >> xsize;
54 52
      if (!ifs1)

Also available in: Unified diff