Dakota  Version 7.0
Explore and Predict with Confidence
Functions
library_mode.cpp File Reference

file containing a mock simulator main for testing Dakota in library mode More...

Functions

void fpinit_ASL ()
 
void run_dakota_parse (const char *dakota_input_file)
 Run a Dakota LibraryEnvironment, mode 1: parsing an input file. More...
 
void serial_interface_plugin (Dakota::LibraryEnvironment &env)
 
void parallel_interface_plugin (Dakota::LibraryEnvironment &env)
 
int main (int argc, char *argv[])
 A mock simulator main for testing Dakota in library mode. More...
 

Detailed Description

file containing a mock simulator main for testing Dakota in library mode

Function Documentation

◆ fpinit_ASL()

void fpinit_ASL ( )

Floating-point initialization from AMPL: switch to 53-bit rounding if appropriate, to eliminate some cross-platform differences.

Referenced by main().

◆ run_dakota_parse()

void run_dakota_parse ( const char *  dakota_input_file)

Run a Dakota LibraryEnvironment, mode 1: parsing an input file.

Simplest library case: this function parses from an input file to define the ProblemDescDB data.

References Environment::execute(), ProgramOptions::input_file(), Environment::mpi_manager(), MPIManager::mpirun_flag(), parallel_interface_plugin(), serial_interface_plugin(), and MPIManager::world_rank().

Referenced by main().

◆ serial_interface_plugin()

void serial_interface_plugin ( Dakota::LibraryEnvironment &  env)

Demonstration of simple plugin where client code doesn't require access to detailed Dakota data (such as Model-based parallel configuration information) to construct the DirectApplicInterface. This example plugs-in a derived serial direct application interface instance ("plugin_rosenbrock").

References Dakota::abort_handler(), Environment::parallel_library(), LibraryEnvironment::plugin_interface(), and Environment::problem_description_db().

Referenced by run_dakota_parse().

◆ parallel_interface_plugin()

void parallel_interface_plugin ( Dakota::LibraryEnvironment &  env)

From a filtered list of Model candidates, plug-in a derived direct application interface instance ("plugin_text_book" for parallel). This approach provides more complete access to the Model, e.g., for access to analysis communicators.

References Dakota::abort_handler(), LibraryEnvironment::filtered_model_list(), ProblemDescDB::get_db_model_node(), Environment::parallel_library(), Environment::problem_description_db(), and ProblemDescDB::set_db_model_nodes().

Referenced by run_dakota_parse().

◆ main()

int main ( int  argc,
char *  argv[] 
)

A mock simulator main for testing Dakota in library mode.

Load a complete input file, attach a client interface, and execute.

References MPIManager::detect_parallel_launch(), fpinit_ASL(), Dakota::mpi_debug_hold(), and run_dakota_parse().