Newsgroups: comp.parallel.pvm
From: nps@nmlc.eee.nott.ac.uk (Nick Smith)
Subject: Is pvm_config() faulty - or am I being stupid?
Organization: Electrical and Electronic Engineering, University of Nottingham
Date: 15 Aug 1995 12:38:58 GMT
Message-ID: <40q4h2$r2a@griffin.ccc.nottingham.ac.uk>

Hello PVM users,

I am having problems getting pvm_config() to return the information for
all machines. I have tried PVM 3.3.8 on HPPA/HP-UX 9.0x and PVM 3.3.7 on
SUN4/SunOS 4.1.3. See the program below with corresponding O/P

The first machine is returned OK, but others are not returned,
or if I try to access higher elements in the returned array, the task exits
without printing anything. I have tried PVM 3.3.8 on HPPA/HP-UX 9.0x with
HP-C compiler, and PVM 3.3.7 on SUN4/SunOS 4.1.3 with gcc.

Any clues would be of great help - is this a bug or am I just being STUPID?

/*
	test for pvm_config()
*/

#include <stdio.h>
#include "pvm3.h"

struct pvmhostinfo *HostInfo[10];

main(void) {
  int i,nhosts,narchs,info,my_tid;
  
  my_tid=pvm_mytid();
  info=pvm_config(&nhosts,&narchs,HostInfo);
  printf("\nHosts: %d, Archs: %d, Info: %d\n",nhosts,narchs,info);

  for (i=0; i<nhosts; i++)
    printf("\nMachine: %s, Speed: %d\n",
      HostInfo[i]->hi_name,HostInfo[i]->hi_speed);
  pvm_exit();
}

pvm> conf
6 hosts, 1 data format
                    HOST     DTID     ARCH   SPEED
                    nmlc    40000     HPPA     714
                    nmla    80000     HPPA     384
                    nmlb    c0000     HPPA     303
                    nmld   100000     HPPA    1000
                    nmle   140000     HPPA     714
                    nmlf   180000     HPPA     556
pvm> spawn -> ctest/ctest
[1]
1 successful
t80001
pvm> [1:t80001] 
[1:t80001] Hosts: 6, Archs: 1, Info: 0
[1:t80001] 
[1:t80001] Machine: nmlc, Speed: 714
[1:t80001] 
[1:t80001] Machine: , Speed: 0
[1:t80001] 
[1:t80001] Machine: , Speed: 0
[1:t80001] 
[1:t80001] Machine: , Speed: 0
[1:t80001] 
[1:t80001] Machine: , Speed: 0
[1:t80001] 
[1:t80001] Machine: , Speed: 0
[1:t80001] EOF
[1] finished
pvm> 

Thanks and Regards,
nick.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ Nick P G Smith              + LAB:                    Tower Block, Room 815 +
+ Electronic Engineering      + VOICE:           +44 (0)115-951-5151 ext 2055 +
+ University of Nottingham    + FAX:                      +44 (0)115-951-5616 +
+ University Park             + WWW:      http://www.nml.eee.nott.ac.uk/~nps/ +
+ Nottingham NG7 2RD          + E-MAIL:                    nps@eee.nott.ac.uk +
+ United Kingdom              +                       nps@nmlb.eee.nott.ac.uk +
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+                                      "In the long run ... we are all dead." +
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

