SHMEM_SET_CACHE_LINE_INV(3)

πŸ“¦
version 5.0.10 Β· 4 versions
, in ubuntu stonking

πŸ’– SHMEM_SET_CACHE_LINE_INV(3) β€” Open MPI, section 3 πŸ’–

okay bestie, sit DOWN because we're talking about cache coherency today and honestly? it's giving ✨control✨

this lil family of routines is the data cache utilities crew: shmem_clear_cache_inv, shmem_set_cache_inv, shmem_set_cache_line_inv, shmem_udcflush, and shmem_udcflush_line. yes they all show up here, they're a package deal, no gatekeeping 🌸


✨ SYNOPSIS ✨

🩷 C or C++

#include <mpp/shmem.h>

void shmem_clear_cache_inv(void)
void shmem_clear_cache_line_inv(void *target)
void shmem_set_cache_inv(void)
void shmem_set_cache_line_inv(void *target)
void shmem_udcflush(void)
void shmem_udcflush_line(void *target)

🩷 Fortran

INCLUDE "mpp/shmem.fh"

CALL SHMEM_CLEAR_CACHE_INV
CALL SHMEM_CLEAR_CACHE_LINE_INV(target)
CALL SHMEM_SET_CACHE_INV
CALL SHMEM_SET_CACHE_LINE_INV(target)

CALL SHMEM_UDCFLUSH
CALL SHMEM_UDCFLUSH_LINE(target)

πŸ’… DESCRIPTION πŸ’…

okay so there's one argument that gets passed to the cache line control routines and she is iconic:

  • target β€” a data object that is local to the processing element (PE). target can be of any noncharacter type. and if you're in Fortran land, she can be of any kind 🫢

now the tea on each routine:

  • shmem_clear_cache_inv (3) β€” disables automatic cache coherency mode that was previously enabled by shmem_set_cache_inv (3) or shmem_set_cache_line_inv. turning it OFF, bestie, lights out πŸ’€
  • shmem_clear_cache_line_inv (3) β€” disables automatic cache coherency mode for the cache line associated with the address of target only. just that one line, not everybody, very targeted behavior slay
  • shmem_set_cache_inv (3) β€” enables the OpenSHMEM API to automatically decide the best strategy for cache coherency. she's the main character making the calls πŸ‘‘
  • shmem_set_cache_line_inv β€” enables automatic cache coherency mode for the cache line associated with the address of target only. again, just that one line, bc we're precise here
  • shmem_clear_cache_inv (3) β€” disables automatic cache coherency mode previously enabled by shmem_set_cache_inv (3) or shmem_set_cache_line_inv. and yeah, the page literally says this twice, i'm not playing, it's in the source like that, so here it is again, no cap πŸ™ˆ
  • shmem_udcflush (3) β€” makes the entire user data cache coherent. the whole thing. all of it. periodt
  • shmem_udcflush_line (3) β€” makes coherent the cache line that corresponds with the address specified by target. one line only, cute and specific πŸŽ€

πŸ“ NOTES πŸ“

these routines have been retained for improved backward compatibility with legacy architectures. so like, they're still here serving looks for the old-school crowd 🧚 not new-new, but definitely still on the roster.

bestie reminder: retained for backward compatibility with legacy architectures. that's the whole vibe of this notes section, no cap.

See also: intro_shmem(3) shmem_put(3) shmem_swap(3)


2003-2026, The Open MPI Community


and that's the whole page, bestie!! πŸ’– this came to you straight from the Open MPI manual, dated Sep 10, 2026, courtesy of those Open MPI girlies at SHMEM_SET_CACHE_LINE_INV(3). go make your cache coherent, ily, bye πŸ¦‹βœ¨πŸ’œ

πŸ“¦ where this page comes from