#include "stdio.h" #include "stdlib.h" #include "pvm3.h" #define N 10 void sendint(int tid, int data) { pvm_initsend(PvmDataDefault); // data // how many // every xth item (stride parameter, see manual) pvm_pkint(&data, 1, 1); pvm_send(tid, 1); } int receiveint() { pvm_recv(-1,-1); int num; pvm_upkint(&num, 1, 1); return num; } int main() { int tid[N]; int number[N] = {2,3,5,1,2,3,5,1,2,9}; pvm_spawn("/home.local/valaki/sort_task", NULL, 0, "", N, tid); int i; //every process will get the next process id to send information to for(i=0; i