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

modspmin.cpp (revision 752)
49 49
//#if defined (AD_DEMO)
50 50
  void adwait(double sec);
51 51
//#endif
52
  int function_minimizer::have_constraints=0;
53
  int function_minimizer::first_hessian_flag=0;
52
__thread int function_minimizer::have_constraints = 0;
53
__thread int function_minimizer::first_hessian_flag = 0;
54 54
  //int function_minimizer::in_likeprof_flag=0;
55 55

  
56 56
class admb_javapointers;
57 57
extern admb_javapointers * adjm_ptr;
58 58

  
59
//  static int try_it_again(int stupid_flag);
60

  
61 59
#if defined(ADMB_REDEMO)
62 60
  static int q830=830;
63
  int ** pflag1;
64
  int ** pflag2;
65
  int ** pflag3;
66
  int ** pflag4;
67
  int ** pflag5;
68
  int * qflag1;
69
  int * qflag2;
70
  int * qflag3;
71
  int * qflag4;
72
  int * qflag5;
61
  int** pflag1;
62
  int** pflag2;
63
  int** pflag3;
64
  int** pflag4;
65
  int** pflag5;
66
  int* qflag1;
67
  int* qflag2;
68
  int* qflag3;
69
  int* qflag4;
70
  int* qflag5;
73 71
  int flag1=10;
74 72
  int flag2=11;
75 73
  int flag3=12;
......
83 81
  void extra_random_effects_generator2(void);
84 82
  void extra_random_effects_generator3(void);
85 83

  
86
  void function_minimizer::computations(int argc,char * argv[])
84
void function_minimizer::computations(int argc,char * argv[])
85
{
86
  tracing_message(traceflag,"A1");
87
  if (option_match(argc,argv,"-mceval") == -1)
87 88
  {
88
    //traceflag=1;
89
    tracing_message(traceflag,"A1");
90
    //if (option_match(argc,argv,"-gui")>-1)
91
    //{
92
    //  vm_initialize();
93
    //  cout << " called vm_initialize() " << endl;
94
    //}
95
#if defined(__SPDLL__)
96
    //if (ad_printf) (*ad_printf)("entered void function_minimizer::computations\n");
97
#endif
98
#if defined (AD_DEMO)
99
     write_banner_stuff();
100
#endif
101
    if (option_match(argc,argv,"-mceval") == -1)
102
    {
103
      //negative_eigenvalue_flag=0;
104
      //do
105
      {
106
#if defined(ADMB_REDEMO)
107
  exit(1);
108
#else
109
        computations1(argc,argv);
110
#endif
111
      }
112
      //while(negative_eigenvalue_flag);
113
    }
114
    else
115
    {
116
      initial_params::mceval_phase=1;
117
      mcmc_eval();
118
      initial_params::mceval_phase=0;
119
    }
120
    other_calculations();
121
    
122
    final_calcs();
123
    // clean up if have random effects
124
#   if defined(USE_LAPLACE)
125
     // cleanup_laplace_stuff(lapprox);
126
#   endif
89
    computations1(argc,argv);
127 90
  }
91
  else
92
  {
93
    initial_params::mceval_phase=1;
94
    mcmc_eval();
95
    initial_params::mceval_phase=0;
96
  }
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff