Newsgroups: comp.parallel.pvm
From: papadopo@cs.utk.edu (Philip Papadopoulos)
Subject: Re: Multiprocessor Question
Organization: CS Department, University of Tennessee, Knoxville
Date: 26 Oct 1995 16:36:38 -0400
Message-ID: <46orgmINNhk1@duncan.cs.utk.edu>

In article <46gf0r$aq1@netnews.upenn.edu> jeff@Adeno.wistar.upenn.edu (Jeff Taylor) writes:
>	OK I've received some helpful replies explaining that only one pvmd
>is needed and that the SGIMP pvmd should be smart enough to spawn processes
>on different nodes.  This seems to be true but I still have some questions 
>and I'll use the 'hitc.f and hitc_slave.f' examples that came with the 
>distribution.  
>	When hitc begins it calls pvmfconfig to find out how many hitc_slaves 
>to spawn.  This call fails in that it only counts my SGIMP machine as one 
>instead of 8.  For example if I start pvm only on the SGIMP, pvmfconfig will 
>return 1.  If I force the issue by adding a line to hitc.f that says "nhost=8"
>then all is well and eight hitc_slaves are spawned, one on each processor.  
>	I would like to be able to add this SGIMP host (or any other host in
>my cluster) dynamically from my application when it isn't too busy so it 
>would be helpful if pvmd could recognize that there are multiple processors
>available.  I suppose I could check the PVM_ARCH variable and if it is SGIMP
>increase nhost by 8 instead of 1, but what if I have multiple SGIMP hosts with
>different numbers of processors?

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	

in hitc.f, change
      call pvmfconfig( nhost, narch, idummy, hostname, arch,
     >                 idummy, info )
c
      print *, nhost,' hosts detected in configuration'
      call pvmfspawn( 'hitc_slave', PVMDEFAULT, '*', nhost, tids, info )

to
      call pvmfconfig( nhost, narch, idummy, hostname, arch,
     >                 ispeed, info )
      nhostp = ispeed
      do i=2,nhost
          call pvmfconfig( nhost, narch, idummy, hostname, arch,
     >                 ispeed, info )
          nhostp = nhostp + ispeed
      enddo
	
c
      print *, nhost,' hosts detected in configuration'
      print *, nhostp,' processors detected in configuration'
	
      nhost = nhostp
      call pvmfspawn( 'hitc_slave', PVMDEFAULT, '*', nhost, tids, info )


Maybe this will work for you? 

