Ticket #34022 (closed submission: fixed)
svipc (new port) -- System V InterProcess Communication (Yorick/Python plug-ins)
|Reported by:||thibaut.paumard@…||Owned by:||macports-tickets@…|
This Portfile contains several subports py*-svipc and yorick-svipc, plug-ins for python and yorick around the SysV IPC functionalities.
It allows sharing memory and passing messages between several processes. The two primary use cases are:
- parallel (multiprocess) computing;
- mixed yorick/python/whatever applications.
yorick-svipc can optionally be used by yorick-yao. To try it:
- as root, give some space to the shared memory and install the packages:
sysctl -w kern.sysv.shmmax=33554432 sysctl -w kern.sysv.shmmin=1 sysctl -w kern.sysv.shmmni=256 sysctl -w kern.sysv.shmseg=64 sysctl -w kern.sysv.shmall=8192 port install yorick-yao yorick-svipc
- as user, copy the examples, request svipc usage, and run the examples (and quit yorick):
cp -a /opt/local/lib/yorick/share/yao/examples ./ cd examples sed -i .bak 's|// \(.*\)\.svipc|\1\.svipc|' test-all.i yorick -i test-all.i quit
- while the tests are running, ipcs -a should list several shared memory segments, semaphores and message queues in use. Running it after the tests are complete should yield an empty list (unless you have other programs using the IPC framework running!)
The python plug-ins also work in real-life examples, but I don't have a simple one to exhibit.
The port uses three patches:
- patch-setup.py.diff: configuration of the python plug-in;
- patch-svipc_misc.h.diff: fix a missing #include;
- patch-svipc_module.c.diff: bugfix backported from git.
I would be grateful if someone would consider committing this port for me.
Kind regards, Thibaut.