Annotation of OpenXM/src/kan96xx/plugin/sm1pvm.hh, Revision 1.2
1.2 ! takayama 1: /* $OpenXM$ */
1.1 maekawa 2: else if (strcmp(key,"start slaves")==0) {
3: if (size != 3)
4: errorKan1("%s\n","[(start slaves) (slave name) n] extension");
5: obj1 = getoa(obj,1);
6: obj2 = getoa(obj,2);
7: if (obj1.tag != Sdollar || obj2.tag != Sinteger)
8: errorKan1("%s\n","[(start slaves) (slave name) n] extension");
9: if (KpvmStartSlaves(obj1.lc.str,obj2.lc.ival)<0)
10: errorKan1("%s\n","Failed to start slaves.");
11: }else if (strcmp(key,"stop slaves")==0) {
12: if (KpvmStopSlaves() < 0)
13: errorKan1("%s\n","Failed to stop slaves.");
14: }else if (strcmp(key,"mcast") == 0) {
15: if (size != 2)
16: errorKan1("%s\n","[(mcast) (command)] extension");
17: obj1 = getoa(obj,1);
18: if (obj1.tag != Sdollar)
19: errorKan1("%s\n","[(mcast) (command)] extension");
20: if (KpvmMcast(obj1.lc.str)<0)
21: errorKan1("%s\n","Failed to mcast to slaves.");
22: }else if (strcmp(key,"job pool") == 0) {
23: if (size != 2)
24: errorKan1("%s\n","[(job pool) list] extension");
25: obj1 = getoa(obj,1);
26: if (obj1.tag != Sarray)
27: errorKan1("%s\n","[(job pool) list] extension. Argumet must be an array.");
28: m = getoaSize(obj1);
29: for (i=0; i<m; i++) {
30: obj2 = getoa(obj1,i);
31: if (obj2.tag != Sdollar) {
32: errorKan1("%s\n","[(job pool) list] extension. Elements must be strings.");
33: }
34: }
35: rob = KpvmJobPool(obj1);
36: }else if (strcmp(key,"change slaves") == 0) {
37: if (KpvmChangeStateOfSlaves(0)<0) {
38: errorKan1("%s\n","Failed to change the state of slaves.");
39: }
40: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>