Newsgroups: comp.parallel.pvm
From: adilger@enel.ucalgary.ca (Andreas Dilger)
Subject: Re: Multiprocessor Question
Organization: ECE Department, U. of Calgary, Calgary, Alberta, Canada
Date: 26 Oct 1995 22:34:48 GMT
Message-ID: <46p2e8$iva@ds2.acs.ucalgary.ca>

In article <46orgmINNhk1@duncan.cs.utk.edu>,
Philip Papadopoulos <papadopo@cs.utk.edu> wrote:
>In article <46gf0r$aq1@netnews.upenn.edu>
>jeff@Adeno.wistar.upenn.edu (Jeff Taylor) writes:
>One thing that some people do is to set the speed parameter to be the number
>of processors on a host. You can set the speed in a hostfile with the
>sp parameter. You could modify your code to increment the number of hosts
>when you return from a pvm_config call.
>
>
>Example hostfile:
>
># A machine with 4 processors
>nutter sp=4
># A machine with 8 processors
>fred sp=8	

Doing it exactly this way can cause a lot of problems, if a system with the
default sp=1000 is added, the application will think 1000 processors are
on that machine.  A safer way of doing it has been mentioned earlier, ie:
use the lower 10 bits to encode the number of CPUs:

     :
     :
     if (speed = 1000)
     {
       ncpu = 1;
     }
     else
     {
       ncpu = speed & 0x3FF;
     }

-- 
Andreas Dilger   University of Calgary  \"If a man ate a pound of pasta and
(403) 220-8792   Micronet Research Group \ a pound of antipasto, would they
Dept of Electrical & Computer Engineering \   cancel out, leaving him still
http://www-mddsp.enel.ucalgary.ca/People/adilger/       hungry?" -- Dogbert

