SHMEM_FENCE(3)
π SHMEM_FENCE(3) β bestie's guide to the put-ordering fence
ok so we're in Open MPI land and this page is about shmem_fence π
πΈ NAME πΈ
shmem_fence β it's giving separate ordering on the sequence of puts issued by this PE to each destination PE. literally that's the whole job, bestie β¨
π¦ SYNOPSIS π¦
so here's how you actually call it, no cap:
C or C++:
#include <mpp/shmem.h>
void shmem_fence(void)
Fortran:
INCLUDE "mpp/shmem.fh"
CALL SHMEM_FENCE
β¨ DESCRIPTION β¨
okay so shmem_fence() is the fence and what a fence does is put a lil divider in your put sequence π The way that it works: it provides an ordering on the put operations issued by the calling PE before the call to shmem_fence() relative to the put operations issued by the calling PE after the call to shmem_fence(). slay.
and the actual guarantee? It guarantees that all such prior put operations issued to a particular destination PE are fully written to the symmetric memory of that destination PE, before any such following put operations to that same destination PE are written to the symmetric memory of that destination PE. periodt. π
β οΈ note that the ordering is provided separately on the sequences of puts from the calling PE to each distinct destination PE. so it's like a fence per-destination, not a global one, iykyk.
and if you need ordering of puts when multiple destination PEs are involved?? bestie you want the shmem_quiet() routine instead. that's the one for that job π
π NOTES π
fr fr, listen: the shmem_quiet function should be called if ordering of puts is desired when multiple remote PEs are involved. don't try to make shmem_fence do a shmem_quiet's job, it will not eat π
See also:
π Copyright π
2003-2026, The Open MPI Community π«Ά
and that's the vibe check, bestie β SHMEM_FENCE(3) from the Open MPI crew, page dated Sep 10, 2026, manual name SHMEM_FENCE(3). go order those puts, main character ππ
π¦ where this page comes from
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms