Newsgroups: comp.parallel.pvm
From: Antonio Scotti <scotti@centauro.upc.es>
Subject: [Correction to:]How to introduce parallel routines to PVM programs
Organization: Universitat Politecnica de Catalunya
Date: 9 Nov 1995 09:44:45 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <47siid$mp7@diable.upc.es>

Hi,
I realized that from the meaning of text of the original posting 
doesn't really express what I had in mind, so I will try to 
reformulate it in another way.

Say I have a pvm program such as the following (as in previous reply to the
original posting):

>  int bufid,bytes,sendertid,msgtag;
>  bufid=pvm_mkbuf(PvmDataDefault);
>  pvm_setrbuf(bufid);  /* don't forget to free the old rbuf */
>  pvm_recv(pvm_parent(),-1);
>  pvm_bufinfo(bufid,&bytes,&sendertid,&msgtag);
>  while (msgtag!=EXIT_TAG) {
>    switch msgtag {
>      case MATRIX_MULT_TAG:
>        do_whatever();
>        break;
>      case DO_SOMETHING_ELSE_TAG:
>        do_something_else();
>        break;
>    }
>    pvm_recv(pvm_parent(),-1);
>    pvm_bufinfo(bufid,&bytes,&sendertid,&msgtag);
>  }
>  /* clean up */
>  pvm_exit();
>  exit(0);

What I actually ment (and the title of my posting, at least, points at it) is,
how can I create parallel procedures on their own right such as the
"do_whatever()" and "do_something_else()" procedures of the example?

Put it on another way, how can I tell my pvm program "Just do this in parallel"
without resorting to the master/slave or spmd paradigms?
I thing goes along with the idea of building parallel functions' libraries,
(perhaps using PVM)
such as parallel routines to perform say, sorting, matrix multiply or whatever
one may need to stuff into one's program.
Or one might even think to write a sequencial program that does "certain
things"
in parallel, in a way that is transparent to the user/programmer, by adding for
example at some stage, a  routine that does its job in parallel.

I am looking forward for your answers.
Cheers,
-- Antonio

 
=============================================================
= Antonio Scotti                                            =
= CIMNE                                                     =     
= International Centre for Numerical Methods in Engineering =
= Universitat Politecnica de Catalunya, Campus Norte        =
= s/n Gran Capita`, Edificio C1                             =
= Barcelona, Spain                                          =
=                                                           =
= phone: ++ 34 3 401.74.03                                  =
= E-mail: scotti@centauro.upc.es                            =
= 							    =
=           "The mind leads, the body follows"              =
=                                     KOICHI TOHEI          =       
=============================================================


