25 if (_s(i) ==
'\\' || _s(i) ==
'/' || _s(i) ==
':')
break;
27 if (_s(i) ==
'/' || _s(i) ==
':')
break;
82 #if defined(USE_ADPVM)
105 cerr <<
"Wrong number of options to -slave -- must be 1"
106 " you have " << nopt <<
endl;
110 if ( (on=
option_match(_argc,_argv,
"-slavedir",nopt))>-1)
118 cerr <<
"Wrong number of options to -slavedir -- must be 1"
119 " you have " << nopt <<
endl;
163 ad_printf(
" -ainp FILE change default ascii input parameter "
164 "filename to FILE\n");
165 ad_printf(
" -binp FILE change default binary input parameter "
166 "filename to FILE\n");
167 ad_printf(
" -est only do the parameter estimation\n");
168 ad_printf(
" -noest do not do the parameter estimation "
170 ad_printf(
" -ind FILE change default input data filename to "
172 ad_printf(
" -lmn N use limited memory quasi newton -- keep "
174 ad_printf(
" -lmn2 N use other limited memory quasi newton -- "
176 ad_printf(
" -ilmn N use other limited memory quasi newton "
177 "for random effects models - keep N steps\n");
178 ad_printf(
" -dd N check derivatives after N function "
180 ad_printf(
" -lprof perform profile likelihood "
182 ad_printf(
" -maxph N increase the maximum phase number to "
184 ad_printf(
" -mcdiag use diagonal covariance matrix for mcmc "
185 "with diagonal values 1\n");
186 ad_printf(
" -mcmc [N] perform markov chain monte carlo with N "
188 ad_printf(
" -mcmult N multiplier N for mcmc default\n");
189 ad_printf(
" -mcr resume previous mcmc\n");
190 ad_printf(
" -mcrb N reduce amount of correlation in the "
191 "covariance matrix 1<=N<=9\n");
192 ad_printf(
" -mcnoscale don't rescale step size for mcmc "
193 "depending on acceptance rate\n");
194 ad_printf(
" -nosdmcmc turn off mcmc histogram calcs to make "
195 "mcsave run faster\n");
196 ad_printf(
" -mcprobe N use probing strategy for mcmc with "
198 ad_printf(
" -mcgrope N Deprecated, same as -mcprobe\n");
199 ad_printf(
" -mcseed N seed for random number generator for "
200 "markov chain monte carlo\n");
201 ad_printf(
" -mcscale N rescale step size for first N "
203 ad_printf(
" -mcsave N save the parameters for every Nth "
205 ad_printf(
" -mceval go through the saved mcmc values from a "
206 "previous mcsave\n");
207 ad_printf(
" -nuts MCMC draws with the no-U-turn sampler\n");
208 ad_printf(
" -rwm MCMC draws with a Metopolis sampler.\n");
209 ad_printf(
" -mcu use uniformly distributed steps for "
210 "mcmc instead of random normal\n");
211 ad_printf(
" -crit N1,N2,... set gradient magnitude convergence "
213 ad_printf(
" -iprint N print out function minimizer report "
215 ad_printf(
" -maxfn N1,N2,.. set maximum number opf function eval's "
217 ad_printf(
" -rs if function minimizer can't make "
218 "progress rescale and try again\n");
221 ad_printf(
" -nox suppress vector and gradient values in "
222 "minimizer screen report\n");
223 ad_printf(
" -phase N start minimization in phase N\n");
224 ad_printf(
" -simplex use simplex for minimization -- "
225 "deprecated, use -neldmead\n");
226 ad_printf(
" -neldmead use Nelder-Mead simplex algorithm for "
228 ad_printf(
" -nohess don't do hessian or delta method for std "
230 ad_printf(
" -eigvec calculate eigenvectors of the Hessian\n");
231 ad_printf(
" -sdonly do delta method for std dev estimates "
232 "without redoing hessian\n");
233 ad_printf(
" -ams N set arrmblsize to N "
234 "(ARRAY_MEMBLOCK_SIZE)\n");
235 ad_printf(
" -cbs N set CMPDIF_BUFFER_SIZE to N "
236 "(ARRAY_MEMBLOCK_SIZE)\n");
237 ad_printf(
" -mno N set the maximum number of independent "
239 ad_printf(
" -mdl N set the maximum number of dvariables to "
241 ad_printf(
" -gbs N set GRADSTACK_BUFFER_SIZE to N "
242 "(ARRAY_MEMBLOCK_SIZE)\n");
243 ad_printf(
" -hess_step N take N Newton steps with inverse Hessian\n");
244 ad_printf(
" -hess_step_tol eps set hess_step tolerance to eps\n");
245 ad_printf(
" -mip N set maximum the number of initial parameters "
246 "to a value N that is greater than zero (default is 4000).\n");
247 #if defined(USE_ADPVM)
248 ad_printf(
" -master run as PVM master program\n");
249 ad_printf(
" -slave run as PVM slave program\n");
250 ad_printf(
" -pvmtime record timing information for PVM "
251 "performance analysis\n");
253 ad_printf(
" -display N N sets display output with \'0\' for quiet display, "
254 "\'1\' for concise display, or \'2\' for legacy display (default is %i).\n",
256 ad_printf(
" -info show how to cite ADMB, license, and "
257 "acknowledgements\n");
258 ad_printf(
" -version show version information\n");
259 ad_printf(
" -help show this message\n\n");
262 ad_printf(
"Random effects options if applicable\n");
263 ad_printf(
" -nr N maximum number of Newton-Raphson "
265 ad_printf(
" -imaxfn N maximum number of evals in quasi-Newton "
266 "inner optimization\n");
267 ad_printf(
" -is N set importance sampling size to N\n");
268 ad_printf(
" -isf N set importance sampling size funnel "
270 ad_printf(
" -isdiag print importance sampling diagnostics\n");
271 ad_printf(
" -hybrid do hybrid Monte Carlo version of MCMC\n");
272 ad_printf(
" -hbf set the hybrid bounded flag for bounded "
274 ad_printf(
" -hyeps mean step size for hybrid Monte Carlo\n");
275 ad_printf(
" -hynstep number of steps for hybrid Monte "
277 ad_printf(
" -noinit do not initialize RE before inner "
279 ad_printf(
" -ndi N set maximum number of separable calls\n");
280 ad_printf(
" -ndb N set number of blocks for RE derivatives "
281 "(reduce temp file size)\n");
282 ad_printf(
" -ddnr use high precision Newton-Raphson, for "
283 "banded Hessian case only\n");
284 ad_printf(
" -nrdbg verbose reporting for debugging "
286 # if defined(__MINI_MAX__)
287 ad_printf(
" -mm N do minimax optimization\n");
289 ad_printf(
" -shess use sparse Hessian structure inner "
292 ad_printf(
"Read online documentation at http://admb-project.org\n");
293 ad_printf(
"Contact <users@admb-project.org> for help.\n");
305 ad_printf(
"Fournier, D.A., H.J. Skaug, J. Ancheta, J. Ianelli, "
306 "A. Magnusson, M.N. Maunder,\n");
307 ad_printf(
"A. Nielsen, and J. Sibert. 2012. AD Model Builder: using "
309 ad_printf(
"differentiation for statistical inference of highly "
310 "parameterized complex\n");
311 ad_printf(
"nonlinear models. Optim. Methods Softw. 27:233-249.\n\n");
318 ad_printf(
"ADMB Foundation and Regents of the University of California\n\n");
319 ad_printf(
"ADMB is free software and comes with ABSOLUTELY NO "
321 ad_printf(
"You are welcome to redistribute it under certain "
323 ad_printf(
"AD Model Builder, or ADMB, was developed by David Fournier "
324 "of Otter Research\n");
325 ad_printf(
"Ltd, Sidney, BC, Canada. In 2007, scientists from the "
326 "University of Hawai'i at\n");
327 ad_printf(
"Manoa Pelagic Fisheries Research Program (John Sibert and "
328 "Anders Nielsen) and\n");
329 ad_printf(
"the Inter-American Tropical Tuna Commission (Mark "
330 "Maunder), in consultation with\n");
331 ad_printf(
"scientists from NOAA Fisheries (Richard Methot), created "
332 "the non-profit ADMB\n");
333 ad_printf(
"Foundation (admb-foundation.org) with the goal of "
334 "increasing the number of ADMB\n");
335 ad_printf(
"users by making the software free and open source. In "
336 "partnership with NOAA\n");
337 ad_printf(
"Fisheries and the National Center for Ecological Analysis "
338 "and Synthesis (NCEAS,\n");
339 ad_printf(
"www.nceas.ucsb.edu), the ADMB Foundation obtained funding "
340 "from the Gordon and\n");
341 ad_printf(
"Betty Moore Foundation (www.moore.org) to acquire the "
342 "copyright to the ADMB\n");
343 ad_printf(
"software suite, in order to make it broadly and freely "
344 "available to the research\n");
345 ad_printf(
"community. In 2008 the copyright was transferred from "
346 "Otter Research Ltd to the\n");
347 ad_printf(
"University of California. The binary files were released "
348 "in November 2008 and\n");
349 ad_printf(
"the source code was released in December 2009. More "
350 "information about the ADMB\n");
351 ad_printf(
"Project can be found at admb-project.org.\n\n");
352 ad_printf(
"ADMB was originally developed by David Fournier of Otter "
353 "Research Ltd.\n\n");
354 ad_printf(
"It is now maintained by the ADMB Core Team, whose members "
356 ad_printf(
"http://admb-project.org/developers/core-team.\n");
379 #if defined(_MSC_VER)
395 assert(_n <= INT_MAX);
419 if (on>
argc-2 ||
argv[on+1][0] ==
'-')
421 cerr <<
"Invalid input data command line option"
422 " -- ignored" <<
endl;
493 if (biopt>
argc-2 ||
argv[biopt+1][0] ==
'-')
495 cerr <<
"Invalid input parameter file command line option"
496 " -- ignored" <<
endl;
500 tmpstring = adstring(
argv[biopt+1]);
510 cerr <<
"Error trying to open binary inoput par file "
511 << tmpstring <<
endl;
524 if (aiopt>
argc-2 ||
argv[aiopt+1][0] ==
'-')
526 cerr <<
"Invalid input parameter file command line option"
527 " -- ignored" <<
endl;
531 tmpstring = adstring(
argv[aiopt+1]);
541 cerr <<
"Error trying to open ascii inoput par file "
542 << tmpstring <<
endl;
596 #if defined(__GNUC__)
598 cout << std::defaultfloat;
601 cout << std::defaultfloat;
604 #if defined(__GNUC__)
606 cout << std::defaultfloat;
609 cout << std::defaultfloat;
621 if (inner_opt_value !=0 )
laplace_approximation_calculator * lapprox
void banner(const adstring &program_name)
Generates a boast. Provides information on SVN revision number, compiler and operating system...
static adpvm_manager * pvm_manager
int separable_calls_counter
static ofstream * global_logfile
int ad_chdir(const char *s)
Description not yet available.
static unsigned char directory_prefix
static adstring working_directory_path
static uistream * global_bparfile
static int inner_opt(void)
ad_comm()
Default constructor.
static adstring adprogram_name
Description not yet available.
int atoi(adstring &s)
Returns a integer converted from input s.
void set_signal_handlers(void)
void exit_handler(int k)
Description not yet available.
prnstream & endl(prnstream &)
adstring strip_full_path(const adstring &_s)
$Id$
static objective_function_value * pobjfun
Description not yet available.
void ad_getcd(const adstring &s)
Description not yet available.
static cifstream * global_datafile
int option_match(int argc, char *argv[], const char *string)
Checks if the program has been invoked with a particular command line argument ("string").
virtual ~ad_comm()
Destructor.
static int saddlepointflag
Description not yet available.
Description not yet available.
dvector value(const df1_one_vector &v)
static cifstream * global_parfile
virtual void userfunction(void)=0
void pre_userfunction(void)
static unsigned int wd_flag
size_t length(const adstring &t)
Returns the size of adstr.
int ad_printf(FILE *stream, const char *format, Args...args)
dvector * separable_function_difference