TaoApplicationCreate(MPI_Comm, TAO_APPLICATION*);Much like creating PETSc vector and matrix objects, the first argument is an MPI communicator. An MPI [(ref using-mpi)] communicator indicates a collection of processors that will be used to evaluate the objective function, compute constraints, and provide derivative information. When only one processor is being used, the communicator MPI_COMM_SELF can be used with no understanding of MPI. Even parallel users need to be familiar with only the basic concepts of message passing and distributed-memory computing. Most applications running TAO in parallel environments can employ the communicator MPI_COMM_WORLD to indicate all processes in a given run.
The second argument is the address of a TAO_APPLICATION variable. This routine will create a new application object and set the variable, which is a pointer, to the address of the object. This application variable can now be used by the developer to define the application and by the TAO solver to solve the application.
Elsewhere in this chapter, the TAO_APPLICATION variable will be referred to as the application object.
After solving the application, the command
TaoAppDestroy(TAO_APPLICATION);will destroy the application object and free the work space associated with it.