Newsgroups: comp.parallel.pvm
From: sdblackb@uncc.edu (Stuart D Blackburn)
Subject: Re: Is pvm_config() faulty - or am I being stupid?
Organization: University of NC at Charlotte
Date: 16 Aug 1995 20:37:22 GMT
Message-ID: <40tku2$s12@news.uncc.edu>

nps@nmlc.eee.nott.ac.uk (Nick Smith) wrote:
	[snip]
>/*
>	test for pvm_config()
>*/
>
>#include <stdio.h>
>#include "pvm3.h"
>
>struct pvmhostinfo *HostInfo[10];

	Your problem is here. You have made the classic C mistake of
declaring a pointer which doesn't actually point to anything. Here
you have declared a pointer to 10 pvmhostinfo structures, but this
doesn't actually give you the 10 structures only a pointer capable of
pointing to 10 pvmhostinfo structures.

	Just remove the * from in front of HostInfo[10] above, and
when you call pvm_config below, pass HostInfo as &HostInfo like you
have done for the other arguments. 
	(i.e.- info=pvm_config(&nhosts, &narchs, &HostInfo);

	I hope this helps.

      _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
      _/   Stuart D. Blackburn, Computer Science Graduate Student   _/
     _/          University of North Carolina at Charlotte         _/
    _/    Graduate Teaching Assistant (CSCI 1201 and 1202 Labs)   _/
   _/      225 E. North St. (PO Box 1012), Albemarle, NC 28002   _/
  _/         Home: (704) 982 0763          Office: 547-4574     _/
 _/E-mail:sdblackb@uncc.edu (http://www.coe.uncc.edu/~sdblackb)_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/





