# PetscGetHostName
Returns the name of the host. This attempts to return the entire Internet name. It may not return the same name as `MPI_Get_processor_name()`. 
## Synopsis
```
PetscErrorCode PetscGetHostName(char name[], size_t nlen)
```
Not Collective


## Input Parameter

- ***nlen -*** length of name



## Output Parameter

- ***name -*** contains host name.  Must be long enough to hold the name
This is the fully qualified name, including the domain.





## Fortran Note
In Fortran this routine has the format

```none
character*(64) name
```
```none
call PetscGetHostName(name,ierr)
```


## See Also
 `PetscGetUserName()`, `PetscGetArchType()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/fhost.c.html#PetscGetHostName">src/sys/utils/fhost.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/utils/fhost.c)


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