# TaoLineSearchSetOptionsPrefix
Sets the prefix used for searching for all TaoLineSearch options in the database. 
## Synopsis
```
#include "petsctaolinesearch.h" 
PetscErrorCode TaoLineSearchSetOptionsPrefix(TaoLineSearch ls, const char p[])
```
Logically Collective on TaoLineSearch


## Input Parameters

- ***ls -*** the TaoLineSearch context
- ***prefix -*** the prefix string to prepend to all TAO option requests



## Notes
A hyphen (-) must NOT be given at the beginning of the prefix name.
The first character of all runtime options is AUTOMATICALLY the hyphen.

For example, to distinguish between the runtime options for two
different line searches, one could call
```none
      TaoLineSearchSetOptionsPrefix(ls1,"sys1_")
      TaoLineSearchSetOptionsPrefix(ls2,"sys2_")
```


This would enable use of different options for each system, such as
```none
      -sys1_tao_ls_type mt
      -sys2_tao_ls_type armijo
```





## See Also
 `TaoLineSearchAppendOptionsPrefix()`, `TaoLineSearchGetOptionsPrefix()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/linesearch/interface/taolinesearch.c.html#TaoLineSearchSetOptionsPrefix">src/tao/linesearch/interface/taolinesearch.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/linesearch/interface/taolinesearch.c)


[Index of all TaoLineSearch routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
