---
name: "MPIR_Type_dup"
section: "3"
platform: "linux"
package: "mpich-doc"
version: "3.3-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/MPIR_Type_dup"
---

# MPIR\_Type\_dup(3)

create a copy of a datatype

## NAME

MPIR\_Type\_dup -  create a copy of a datatype

## SYNOPSIS

```
#undef FUNCNAME
#define FUNCNAME MPIR_Type_dup
#undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIR_Type_dup(MPI_Datatype oldtype, MPI_Datatype * newtype)
```

## INPUT PARAMETERS

- **oldtype**

  \- handle of original datatype

## OUTPUT PARAMETERS

- **newtype**

  \- handle of newly created copy of datatype

## RETURN VALUE

0 on success, MPI error code on failure.
