Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/generate_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ for f in $(find ../../umbridge/ -name 'README.md'); do
$NAME
EOF
done

# Extra docs. Added manually
echo " ../shared_memory" >> docs_output/source/umbridge/index.rst
echo " ../mpi_container" >> docs_output/source/umbridge/index.rst
echo " ../math_description" >> docs_output/source/umbridge/index.rst

20 changes: 20 additions & 0 deletions docs/source/shared_memory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _shared-memory:

=============================================
Client-Server Communication via Shared Memory
=============================================

UM-Bridge uses HTTP to communicate between an UQ client and a model server
by default. However, this is not the most performant option (in HPC) as it
carries around 1 millisecond of overhead per request. We provide a quicker
alternative that uses shared memory (RAM) to transfer data. This approach
works by using allocated memory buffers in RAM as the transfer medium for
UM-Bridge inputs and outputs. To prevent data races in a parallel setting,
each memory buffer is tagged with the ID of the thread making the request
in the parallel client, and this ID is shared through a JSON entry so that
the model can access the correct buffer.

Currently, only the C++ and Python implementations are supported, and this
feature is enabled automatically when available. The code will first
perform a test transfer using shared memory when the client first connects
to the server; it reverts back to HTTP if this test fails.
Loading