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

newmodm4.cpp (revision 752)
4 4
 * Author: David Fournier
5 5
 * Copyright (c) 2008-2012 Regents of the University of California 
6 6
 */
7
#include <thread>
8
#include <sstream>
7 9
#include <admodel.h>
8 10

  
9 11
double function_minimizer::unrestricted_hess_determinant(void)
10 12
{
11
  adstring tmpstring="admodel.hes";
12
  if (ad_comm::wd_flag)
13
     tmpstring = ad_comm::adprogram_name + ".hes";
14
  uistream ifs((char*)tmpstring);
15
    
13
  std::thread::id this_thread_id = std::this_thread::get_id();
14
  std::ostringstream oss;
15
  oss << *ad_comm::adprogram_name << this_thread_id << ".hes";
16
  uistream ifs(oss.str().c_str());
16 17
  if (!ifs)
17 18
  {
18
    cerr << "Error opening file " << (char*) tmpstring
19
    cerr << "Error opening file " << oss.str()
19 20
      << " in unrestricted_hess_determinant" << endl;
20 21
  }
21 22
  int nvar;

Also available in: Unified diff