PVM tesztelése IPv6 környezetben

PVM

Az Euro6IX projektben készült egy patch a PVM-hez ami lehetővé teszi az IPv6 müködést: http://www.ngn.euro6ix.org/IPv6/pvm/ A projektben ezt

PVM 3.4.4

Letölthető:

http://www.netlib.org/pvm3/pvm3.4.4.tgz

IPv6 patch elérhető innen:

pvm3-3.4.4-v6-23042005.diff

olvashato formaban: pvm3-3.4.4-v6-23042005.diff.txt

és müködik is vele, de a projektben a legfrisebb változatot is megvizsgáltuk.

PVM 3.4.5 (latest release)

Letölthető:

http://www.netlib.org/pvm3/pvm3.4.5.tgz

IPv6 patch:

Megpróbáltuk a 3.4.5-s pvm-t patchelni a 3.4.4-es diff-el. Eredménye az alábbiakban látszik:

roczei@zion:~/temp$ patch -p0 < pvm3-3.3.4-v6-23042005.diff
patching file pvm3/console/cmds.c
Hunk #1 succeeded at 437 (offset 4 lines).
patching file pvm3/hoster/pvmwinrexec.c
Hunk #1 succeeded at 318 (offset 6 lines).
Hunk #2 succeeded at 341 (offset 6 lines).
Hunk #3 succeeded at 373 (offset 6 lines).
patching file pvm3/hoster/pvmwinrsh.c
patching file pvm3/src/AIX4SP2/pvmdmimd.c
Hunk #1 succeeded at 851 (offset 13 lines).
patching file pvm3/src/BEOLIN/pvmdmimd.c
Hunk #1 succeeded at 170 (offset 10 lines).
Hunk #2 succeeded at 205 (offset 10 lines).
patching file pvm3/src/ddpro.c
Hunk #1 succeeded at 438 (offset 22 lines).
Hunk #2 succeeded at 927 (offset 22 lines).
Hunk #3 succeeded at 950 (offset 22 lines).
Hunk #4 succeeded at 969 (offset 22 lines).
Hunk #5 succeeded at 979 (offset 22 lines).
Hunk #6 succeeded at 1748 (offset 25 lines).
Hunk #7 succeeded at 2069 (offset 25 lines).
patching file pvm3/src/host.c
Hunk #1 succeeded at 275 (offset 9 lines).
Hunk #2 succeeded at 823 (offset 9 lines).
Hunk #3 succeeded at 894 (offset 9 lines).
Hunk #4 succeeded at 946 (offset 9 lines).
Hunk #5 succeeded at 1026 (offset 9 lines).
Hunk #6 succeeded at 1057 (offset 11 lines).
Hunk #7 succeeded at 1068 (offset 11 lines).
Hunk #8 succeeded at 1099 (offset 11 lines).
Hunk #9 succeeded at 1110 (offset 11 lines).
Hunk #10 succeeded at 1136 (offset 11 lines).
patching file pvm3/src/host.h
patching file pvm3/src/lpvm.c
Hunk #1 succeeded at 659 (offset 26 lines).
Hunk #2 succeeded at 686 (offset 26 lines).
Hunk #3 succeeded at 1255 (offset 26 lines).
Hunk #4 succeeded at 1416 (offset 26 lines).
Hunk #5 succeeded at 1791 (offset 26 lines).
Hunk #6 succeeded at 2350 with fuzz 1 (offset 32 lines).
Hunk #7 succeeded at 2458 (offset 32 lines).
Hunk #8 succeeded at 2886 (offset 34 lines).
Hunk #9 succeeded at 2894 (offset 34 lines).
Hunk #10 succeeded at 2982 (offset 34 lines).
Hunk #11 succeeded at 3287 (offset 34 lines).
patching file pvm3/src/lpvm.h
Hunk #1 succeeded at 111 (offset 4 lines).
Hunk #2 succeeded at 198 (offset 6 lines).
patching file pvm3/src/lpvmmimd.c
Hunk #1 succeeded at 291 (offset 4 lines).
Hunk #2 succeeded at 1223 (offset 7 lines).
Hunk #3 succeeded at 1234 (offset 7 lines).
patching file pvm3/src/lpvmshmem.c
Hunk #1 succeeded at 503 (offset 10 lines).
Hunk #2 succeeded at 584 (offset 10 lines).
Hunk #3 succeeded at 638 (offset 10 lines).
Hunk #4 succeeded at 654 (offset 10 lines).
Hunk #5 succeeded at 2698 (offset 10 lines).
patching file pvm3/src/mppmsg.c
Hunk #2 succeeded at 830 (offset 1 line).
Hunk #3 succeeded at 851 (offset 1 line).
patching file pvm3/src/OS2/src/rexec.c
patching file pvm3/src/OS2/src/ruserpas.c
patching file pvm3/src/pvmcruft.c
Hunk #1 succeeded at 673 (offset 12 lines).
Hunk #2 succeeded at 716 (offset 12 lines).
Hunk #3 succeeded at 731 (offset 12 lines).
Hunk #4 succeeded at 741 (offset 12 lines).
patching file pvm3/src/pvmd.c
Hunk #1 succeeded at 749 (offset 74 lines).
Hunk #2 succeeded at 812 (offset 80 lines).
Hunk #3 succeeded at 1807 (offset 99 lines).
Hunk #4 succeeded at 2393 with fuzz 2 (offset 99 lines).
Hunk #5 succeeded at 2483 (offset 100 lines).
Hunk #6 succeeded at 4822 (offset 118 lines).
Hunk #7 FAILED at 4857.
Hunk #8 succeeded at 4902 (offset 141 lines).
Hunk #9 succeeded at 4924 (offset 141 lines).
Hunk #10 succeeded at 4941 (offset 141 lines).
Hunk #11 succeeded at 5372 (offset 141 lines).
1 out of 11 hunks FAILED -- saving rejects to file pvm3/src/pvmd.c.rej
patching file pvm3/src/pvmipv6.h
patching file pvm3/src/SP2MPI/pvmdmimd.c
Hunk #1 succeeded at 852 (offset 13 lines).
patching file pvm3/src/task.h
roczei@zion:~/temp$

Látható, hogy a 3.4.4-es diff fájl nem teljesen jó a pvm 3.4.5-höz - egyetlen helyen nem volt lehetséges 3.4.4-hez készített patch-et alkalmazni.

Hol nem sikerült a patchelés? pvm3/src/pvmd.c.rej:

***************
*** 4855,4866 ****
        * make pvmd-pvmd socket
        */
-       if ((netsock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
                pvmlogperror("mksocs() socket netsock");
                return 1;
        }
-       hp->hd_sad.sin_port = 0;
        oslen = sizeof(hp->hd_sad);
        if (bind(netsock, (struct sockaddr*)&hp->hd_sad, oslen) == -1)
        {
--- 4857,4868 ----
        * make pvmd-pvmd socket
        */
+       if ((netsock = socket(PF_FAMILY, SOCK_DGRAM, 0)) == -1) {
                pvmlogperror("mksocs() socket netsock");
                return 1;
        }
+       PORT_FROM_SA(hp->hd_sad) = 0;
        oslen = sizeof(hp->hd_sad);
        if (bind(netsock, (struct sockaddr*)&hp->hd_sad, oslen) == -1)
        {

Ennek megfelelően a javított IPv6 patch:

pvm3-3.3.5-v6-13082007.diff

olvashato formaban: pvm3-3.3.5-v6-13082007.diff.txt

Ezt hiba nélkül lehet alkalmazni:

roczei@knowarc1:~$ patch -p0 < pvm3-3.3.5-v6-13082007.diff
patching file pvm3/console/cmds.c
patching file pvm3/hoster/pvmwinrexec.c
patching file pvm3/hoster/pvmwinrsh.c
patching file pvm3/src/AIX4SP2/pvmdmimd.c
patching file pvm3/src/BEOLIN/pvmdmimd.c
patching file pvm3/src/ddpro.c
patching file pvm3/src/host.c
patching file pvm3/src/host.h
patching file pvm3/src/lpvm.c
patching file pvm3/src/lpvm.h
patching file pvm3/src/lpvmmimd.c
patching file pvm3/src/lpvmshmem.c
patching file pvm3/src/mppmsg.c
patching file pvm3/src/OS2/src/rexec.c
patching file pvm3/src/OS2/src/ruserpas.c
patching file pvm3/src/pvmcruft.c
patching file pvm3/src/pvmd.c
patching file pvm3/src/pvmipv6.h
patching file pvm3/src/SP2MPI/pvmdmimd.c
patching file pvm3/src/task.h
roczei@knowarc1:~$ 

Teszt eredmények

1. teszt

roczei@knowarc1:~$ pvm
pvmd already running.
pvm> halt
halt
Terminated
roczei@knowarc1:~$ netstat -uan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 0.0.0.0:2049            0.0.0.0:*
udp        0      0 0.0.0.0:780             0.0.0.0:*
udp        0      0 0.0.0.0:783             0.0.0.0:*
udp        0      0 0.0.0.0:791             0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp        0      0 193.224.163.15:123      0.0.0.0:*
udp        0      0 127.0.0.1:123           0.0.0.0:*
udp        0      0 0.0.0.0:123             0.0.0.0:*
udp6       0      0 :::123                  :::*
roczei@knowarc1:~$ pvm
pvm> quit
Console: exit handler called
pvmd still running.
roczei@knowarc1:~$ netstat -uan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp        0      0 0.0.0.0:2049            0.0.0.0:*
udp        0      0 0.0.0.0:780             0.0.0.0:*
udp        0      0 0.0.0.0:783             0.0.0.0:*
udp        0      0 0.0.0.0:791             0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp        0      0 193.224.163.15:123      0.0.0.0:*
udp        0      0 127.0.0.1:123           0.0.0.0:*
udp        0      0 0.0.0.0:123             0.0.0.0:*
udp6       0      0 2001:738:0:600:21:45282 :::*
udp6       0      0 2001:738:0:600:21:45283 :::*
udp6       0      0 :::123                  :::*
roczei@knowarc1:~$

2. teszt

roczei@knowarc1:~/pvm3$ pvm
pvmd already running.
pvm> conf
conf
4 hosts, 1 data format
                    HOST     DTID     ARCH   SPEED       DSIG
                knowarc1    40000    LINUX    1000 0x00408841
                knowarc2    80000    LINUX    1000 0x00408841
                knowarc3    c0000    LINUX    1000 0x00408841
                knowarc4   100000    LINUX    1000 0x00408841
pvm> spawn -5 -> hello
spawn -5 -> hello
[1]
5 successful
tc0003
tc0004
t100004
t40006
t80004
pvm> [1:t40007] EOF
[1:t100004] i'm t100004
[1:t100004] from t80005: hello, world from knowarc2
[1:t80005] EOF
[1:t100004] EOF
[1:t80004] i'm t80004
[1:t80004] from t40007: hello, world from knowarc1
[1:t80004] EOF
[1:t40006] i'm t40006
[1:t40006] from tc0005: hello, world from knowarc3
[1:t40006] EOF
[1:tc0005] EOF
[1:t80006] EOF
[1:tc0004] i'm tc0004
[1:tc0004] from t80006: hello, world from knowarc2
[1:tc0004] EOF
[1:tc0003] i'm tc0003
[1:tc0003] from t40008: hello, world from knowarc1
[1:t40008] EOF
[1:tc0003] EOF
[1] finished
pvm>

3. teszt

roczei@knowarc1:/tmp$ ls -l pvm*
-rw-------  1 roczei roczei  19 2007-08-13 10:40 pvmd.1000
-rw-------  1 roczei roczei 452 2007-08-13 12:50 pvml.1000
srwxr-xr-x  1 roczei roczei   0 2007-08-13 10:40 pvmtmp030772.0
roczei@knowarc1:/tmp$ cat pvmd.1000
/tmp/pvmtmp030772.0
roczei@knowarc1:/tmp$ cat pvml.1000
[t80040000] 08/13 10:40:52 knowarc1 ([2001:738:0:600:216:3eff:fe00:26]:45015) LINUX 3.4.5
[t80040000] 08/13 10:40:52 ready Mon Aug 13 10:40:52 2007
[t80040000] 08/13 12:50:16 locloutput() write: errno=32
[t80040000] 08/13 12:50:16 em=0xb7f2cee0
[t80040000] 08/13 12:50:16 [42/�][72/�][6f/�][6b/�][65/�][6e/�][20/�][70/�][69/�][70/�]
[t80040000] 08/13 12:50:16 locloutput() write: Broken pipe
[t80040000] 08/13 12:50:16 locloutput() marking t40001 dead
roczei@knowarc1:/tmp$

Értékelés

A teszt eredményekből látszik, hogy a PVM IPv6-on kommunikál. Annyi a szépséghibája, hogy ebben az esetben csak és kizárólag IPv6-on képes beszélni, IPv4-en nem. A program forditásakor tulajdonképpen egy kapcsolóval kell megadni, hogy IPv6-ot, vagy IPv4-et szeretnénk használni:

roczei@knowarc1:~$ export PVM_RSH=`which ssh`
roczei@knowarc1:~$ cd pvm3
roczei@knowarc1:~/pvm3$ export PVM_ROOT=`pwd`
roczei@knowarc1:~/pvm3$ make CFLOPTS="-DINET6"

Abban az esetben, ha meg van adva a CFLOPTS="-DINET6" kapcsoló, akkor IPv6, ha nincs megadva, akkor IPv4 alapú lesz.

Campus6: IPv6pvm (last edited 2008-04-10 15:29:36 by localhost)