Home > Archive > Lisp > April 2004 > [ANN] LPVM-0.0 -- Common Lisp bindings for PVM
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[ANN] LPVM-0.0 -- Common Lisp bindings for PVM
|
|
| Ivan Boldyrev 2004-04-24, 1:32 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
http://lispnik.newmail.ru/lpvm
LPVM is PVM3 bindings for Common Lisp with UFFI.
PVM is Parallel Function Machine, message-passing communication
library for parallel computations.
This package requires UFFI. See http://www.clicki.net/UFFI for more
information.
This is pre-alfa version of LPVM. It was developed and tested with
CMU CL 18e. I used UFFI for portablity, but I'm not sure I got UFFI
docs right. So, patches are welcome :)
Some function has special fast implementation for CMU CL.
LPVM is distributed under terms of MIT-like license. See LICENSE.MIT
for more details.
- --
Ivan Boldyrev
| recursion, n:
| See recursion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.5 (GNU/Linux)
iQEVAwUBQIqOiQ4ALcwzZFpVAQJgkAf8DKsR/g3XnJNJDNZ9TlpgA9toaJIILgfg
a5j/5xNinJ0gTVqSWHRHTEYyxmSe60FroGw0dX/gYxvEpraz08k+fgBJpT2gKbxg
0U1p4cf513Ogi+N3CRFbaP54izTPeP3JUnXPT3Qf
JWNXjYItggXdVWAHUMU+TcsU
cwi9sOybkETiPi8id3sB3KOpCcUg/FTkG0DKC6NDtEBpRXD+1vQmo7vKwEQAnPNk
FL3LFFBQb3vsS+prp7aFO2cij6KTLS5g3RoZxViw
SEotOLySdHzVLPNWlz4p6G9E
dyECSx8OmJAIXkct2VZu14GzQS4MC0KoKT5jtTII
TaGuBiQKyL+G4g==
=zrEK
-----END PGP SIGNATURE-----
| |
|
|
| Ivan Boldyrev 2004-04-24, 5:37 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8725 day of my life Kenny Tilton wrote:
> Ivan Boldyrev wrote:
>
>
> Cool. Pardon a Networking for Dummies question, but can this be used
> instead of sockets?
Probably :) But PVM is more high-level than sockets.
Main difference: with sockets you communicate from ip+port to ip+port
with sequences of bytes. With PVM you communicate from task to task
with messages (messages has message IDs which are similar to
conception of ports). Two task may run at different or same machine,
but they communicate in same faction. Plus group operations, barrier
synchronization etc.
Here is a sample of passing a message from one process to another:
(defconstant +msgid+ 101)
;;; One task
(defun send-data (recipient len)
;; Generate data
(let ((ddata (make-array len
:element-type 'double-float
:initial-contents
(loop :for i :from 1 :to len
:collect (sin (coerce i 'double-float))))))
(pvm:send-message (recipient +msgid+)
(pvm:pkint len) ; Send size of array
(pvm:pkdouble ddata len)))) ; Send array
;;; Second task
(defun recv-data ()
(let ((ddata (make-array len
:element-type 'double-float)))
(pvm:recv-message (-1 +msgid+ ret) ; -1 means "from any sender"
(let ((len (pvm:upkint))) ; Unpack number -- length of data
(pvm:upkdouble-array len))))) ; Unpack array of double floats
(NO WARRANTY: this is modification of one of samples. I did test
original version, but I didn't test modified one.)
PVM:SEND-MESSAGE and PVM:RECV-MESSAGE are macros that can be used when
you do not worry about error-checking :)
You can pass strings, numbers of different sizes (C/FORTRAN types only).
> Or does it sit on top of sockets?
Implementation dependent. For example, implementation for
multiprocessors can use shared memory, and so on...
And there are indeed some version of PVM for special hardware:
PVM is a software system that enables a collection of
heterogeneous computers to be used as a coherent and flexible
concurrent computational resource.
The individual computers may be shared- or local-memory
multiprocessors, vector supercomputers, specialized graphics
engines, or scalar workstations, that may be interconnected by
a variety of networks, such as ethernet, FDDI.
And all implementations must be interoperable.
> I looked around but could figure out: can I just give it an ip
> address when adding hosts?
Implementation dependent, again :) Common implementation for clusters
can. But added host must be pre-configured: e.g. you must provide a
way to run tasks at added host (again, it's for common implementation;
I don't know about other ones). It is usually done with SSH pubkey
authentication or just RSH for clusters in protected networks. If SSH
daemon is started by system administrator, all other configuration job
may be performed by user.
I wouldn't use PVM for implementing Internet service a-la HTTP server
or something like that. All nodes of PVM are parts of united Parallel
Virtual Machine, and they are, ahem, almost equal :)
- --
Ivan Boldyrev
Is 'morning' a gerund?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.5 (GNU/Linux)
iQEVAwUBQIrJaw4ALcwzZFpVAQJpJQf/aaG0TWDAjs1xczi7WEvtrrphwu8sLtr/
kifb2BieMtYCg+R3NOJB/G3oizJihMFdiJBUlSUWIU6KJTGwRl+tX/nIo2li0oHm
S3CrVGa3ygVk42y2Pe/9Mw9YqEOeDbcUO/YaMvl7XjVtvZigDeIrRPkWao72txDb
lxCQZyi+mcsWHFzgaHZz/ 4L3qT2eAt7WY+CceaizjDgTMLSdYr6i4NhiFa79q
qsZ
5tJFA+s8HH2EUcngwqJSROAbdhq3pY+NH+sAPXcB
S0UG4Tk/vsuV/VNnwd+My2sM
pY0hFTnU5pkjIzUj5QzutMn9WAxwUWDGrRTCLC6x
8m0vhNiTVmdn1Q==
=SqXR
-----END PGP SIGNATURE-----
| |
| Ivan Boldyrev 2004-04-24, 6:35 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8725 day of my life Kenny Tilton wrote:
> Ivan Boldyrev wrote:
>
>
> Cool. Pardon a Networking for Dummies question, but can this be used
> instead of sockets? Or does it sit on top of sockets? I looked around
> but could figure out: can I just give it an ip address when adding
> hosts?
Suggested reading:
* An Introduction to PVM Programming
Short description PVM and most important functions
<http://www.csm.ornl.gov/pvm/intro.html>
* PVM: Parallel Virtual Machine: A Users' Guide and Tutorial for
Networked Parallel Computing
(aka PVM Book) On-line version of book published in 1994 by MIT Press.
<http://www.netlib.org/pvm3/book/pvm-book.html>
* PVM: Parallel Virtual Machine
Main site. Source code, documentation, links etc.
<http://www.csm.ornl.gov/pvm/pvm_home.html>
- --
Ivan Boldyrev
Your bytes are bitten.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.5 (GNU/Linux)
iQEVAwUBQIrLzg4ALcwzZFpVAQLOgggAm0EcWigA
jgaAG9lnaSUJczoKlfWgcB7b
yX5V0o9u5Y9yaP4/hcHZf2RZOSBgyWtauy7Soy3IuXLBRzp715jj9M/ePyU9PBYp
9aFwSc8vkzCrch4HcbXa8fyFes7rMYoTtR1tgSrh
AVx5XI1Lz0OeN2Ll/oMnHjAd
TMBiZYxwYIVVNjkn3JjA8vDlhGaPAS3n7+X6VwJN
c5QgxHzGFIYSCWnMx5cb6MiL
Th/ 6l54tdH253PNqPPEf0ASWulHkT00s2G7O+h7HcfN
uwn+r/cxniYjXTo5GyYjz
bw5d2Qd0BoxnUz/E5pHrRpTkfamWKeSYLBPltjL2HOcKDfPn/Sf52w==
=IyZ6
-----END PGP SIGNATURE-----
| |
| Björn Lindberg 2004-04-25, 10:35 am |
| Ivan Boldyrev <boldyrev+nospam@cgitftp.uiggm.nsc.ru> writes:
> On 8725 day of my life Kenny Tilton wrote:
>
> Suggested reading:
>
> * An Introduction to PVM Programming
> Short description PVM and most important functions
> <http://www.csm.ornl.gov/pvm/intro.html>
>
> * PVM: Parallel Virtual Machine: A Users' Guide and Tutorial for
> Networked Parallel Computing
> (aka PVM Book) On-line version of book published in 1994 by MIT Press.
> <http://www.netlib.org/pvm3/book/pvm-book.html>
>
> * PVM: Parallel Virtual Machine
> Main site. Source code, documentation, links etc.
> <http://www.csm.ornl.gov/pvm/pvm_home.html>
I am going to have a look at these links. Just one question: How is
PVM as compared to MPI? Is it similar, or at a different level of
abstraction?
Björn
| |
|
|
> I am going to have a look at these links. Just one question: How is
> PVM as compared to MPI? Is it similar, or at a different level of
> abstraction?
I'd say this is the sort of question people don't really agree on. If
you stand far enough away and squint, they solve roughly the same
kinds of problems, but if you start to examine them closely and talk
to the advocates of one system or the other, they come off as quite
different (i.e., Google for "PVM vs MPI"). Speaking *very* roughly,
I'd say that MPI is stronger if you're trying to build a "fine-grained
parallel" system, where all the computers are really doing the same
thing --- you're multiplying a vector by an enormous matrix, and you
want different machines to store and operate on different parts of the
matrix. PVM is stronger if you're doing something heterogenous ---
different machines connected to different databases, for instance.
That said, I've not actually used MPI. I've used PVM some and found
it useful.
rif
| |
| Ivan Boldyrev 2004-04-29, 8:29 pm |
| |
|
|
|
|