---
name: "shmem_long_set.openmpi"
section: "3"
platform: "linux"
package: "openmpi-doc"
version: "5.0.7-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/shmem_long_set.openmpi"
---

# shmem\_long\_set.openmpi(3)

[*shmem\_double\_set*(3)](/shmem_double_set/3.md), [*shmem\_float\_set*(3)](/shmem_float_set/3.md), [*shmem\_int\_set*(3)](/shmem_int_set/3.md), [*shmem\_long\_set*(3)](/shmem_long_set/3.md), [*shmem\_longlong\_set*(3)](/shmem_longlong_set/3.md) shmem\_int4\_set(3), shmem\_int8\_set(3), shmem\_real4\_set(3), shmem\_real8\_set(3), - Atomically sets the value of a remote data object

## SYNOPSIS

C or C++:

```
#include <mpp/shmem.h>
void shmem_double_set(double *target, double value, int pe)
void shmem_float_set(float *target, float value, int pe)
void shmem_int_set(int *target, int value, int pe)
void shmem_long_set(long *target, long value, int pe)
void shmem_longlong_set(long long *target, long long value, int pe)
```

Fortran:

```
INCLUDE "mpp/shmem.fh"
INTEGER pe
CALL SHMEM_INT4_SET(target, value, pe)
CALL SHMEM_INT8_SET(target, value, pe)
CALL SHMEM_REAL4_SET(target, value, pe)
CALL SHMEM_REAL8_SET(target, value, pe)
```

## DESCRIPTION

The set routines write the **value** into the address **target** on **pe** as an atomic operation.

The arguments are as follows:

- **target**

  The remotely accessible data object to be set on the remote PE.

- **value**

  The value to be atomically written to the remote PE.

- **pe**

  An integer that indicates the PE number upon which target is to be updated. If you are using Fortran, it must be a default integer value.

## RETURN VALUES

NONE

**SEE ALSO:**

[*intro\_shmem*(3)](/intro_shmem/3.md)

## COPYRIGHT

2003-2025, The Open MPI Community
