simple PVM example

Ivan Maximov vaborg at gmail.com
Tue Sep 9 18:02:35 CEST 2008


Hi!
Can someone explains to me a primitive PVM example?

I'd like to test a PVM mechanism. I setup vars: $SCI, $PVM_ROOT and $PVM_ARCH
PVM works on all cluster nodes and it found a configuration file with the
computer names.
.pvmd.conf:
w1
w2
w3
...
wN
* dx=$PVM_ROOT/lib/pvmd ep=$SCI/bin:$PVM_ROOT/bin/$PVM_ARCH

and I'd like to execute it one different nodes and get node's name:
p=pvm_parent();
if p == -23,
	printf("\nIt is a parent");
	pvm_spawn("\home\user\scilab\prob.sce",1,"nw");
	result=pvm_recv(-1,-1)
	printf("\nResult is %s",result);
else
	buf=unix_g("uname -n");	
	pvm_send(p,buf,1);
end
pvm_exit();
quit();

What's wrong with program?
Why it doesn't work like I want: I would like to get node's name and print it.
Thanks a lot in advance!


---------
best regards,
Ivan




More information about the users mailing list