17 PRINTF("Pe(%d) tid=%d:pvm_mytid()\n",MYPE(),PE2TID(MYPE()+1));
20 return PE2TID(MYPE());
28 PRINTF("Pe(%d) tid=%d:pvm_exit()\n",MYPE(),pvm_mytid());
36 int pvm_spawn(char *task
, char **argv
, int flag
,
37 char *where
, int ntask
, int *tids
)
43 PRINTF("Pe(%d) tid=%d:pvm_spawn()\n",MYPE(),pvm_mytid());
47 if (numt
> CmiNumPes())
50 PRINTF("%s: preping %d tids (wanted to prep %d)\n",__FILE__
,numt
,ntask
);
56 PRINTF("Pe(%d) tids[%d]=%d (%d)\n",MYPE(),i
,PE2TID(i
),tids
[i
]);
66 PRINTF("Pe(%d) tid=%d:pvm_parent()\n",MYPE(),pvm_mytid());
70 * I think it would be better to return PvmNoParent, but
71 * this may make sense too, and it makes namd2/DPMTA work.
76 int pvm_config(int *nhost
, int *narch
, struct pvmhostinfo
**hostp
)
85 PRINTF("tid=%d:pvm_config(%x,%x,%x)\n",pvm_mytid(),nhost
,narch
,hostp
);
87 printf("tid=%d:pvm_config(%x,%x,%x)\n",pvm_mytid(),nhost
,narch
,hostp
);
88 printf("%d\n",*nhost
);
89 *nhost
=nh
=CmiNumPes();
97 *hostp
= (struct pvmhostinfo
*)MALLOC(nh
*sizeof(struct pvmhostinfo
));
99 if (*hostp
== (struct pvmhostinfo
*)NULL
)
102 for(i
=0; i
<nh
; i
++) {
103 hostp
[i
]->hi_tid
=PE2TID(i
);
104 hostp
[i
]->hi_name
="";
105 hostp
[i
]->hi_arch
="CONVERSE";
106 hostp
[i
]->hi_speed
=1000;
112 int pvm_tasks(int which
, int *ntask
, struct pvmtaskinfo
**taskp
)
117 PRINTF("tid=%d:pvm_tasks(%d,%x,%x)\n",pvm_mytid(),which
,ntask
,taskp
);
125 *taskp
= (struct pvmtaskinfo
*)MALLOC(*ntask
* sizeof(struct pvmtaskinfo
));
127 if (*taskp
== (struct pvmtaskinfo
*)NULL
)
130 for(i
=0; i
<*ntask
; i
++) {
131 taskp
[i
]->ti_tid
=PE2TID(i
);
132 taskp
[i
]->ti_ptid
=PE2TID(0);
133 taskp
[i
]->ti_host
=PE2TID(i
);
135 taskp
[i
]->ti_a_out
="";
141 int pvm_setopt(int what
, int val
)
144 PRINTF("tid=%d:pvm_setopt(%d,%d)\n",pvm_mytid(),what
,val
);
149 int pvm_gsize(char *group
)
152 PRINTF("tid=%d:pvm_gsize(%s)\n",pvm_mytid(),group
);
157 int pvm_gettid(char *group
, int inum
)
160 PRINTF("tid=%d:pvm_gettid(%s,%d)\n",pvm_mytid(),group
,inum
);
165 int pvm_catchout(FILE *ff
)
167 PRINTF("Warning: pvm_catchout not implemented\n");