Newsgroups: comp.parallel.pvm
From: ladanyi@cs.cornell.edu (La'szlo' Lada'nyi)
Subject: Re: xpvm1.0 and "hostfile"
Organization: Cornell University Computer Science Department
Date: Fri, 17 Jun 1994 18:14:13 GMT
Message-ID: <1994Jun17.181413.7280@cs.cornell.edu>

cfreese@super.org (Craig F. Reese) writes:

>I don't know why the locations of pvm executables always gives
>me such difficulty but I thought some recent "discoveries" might
>save some others a bit of time.

>  It appears to me (both by experiment and by reading the
>  source code) that xpvm pretty much ignores any host options
>  in the hostfile (".xpvm_hosts").

>Clearly any lines starting with '*' are ignored, and it appears
>that things like dx, ep, etc.. are just ignored and there doesn't seem
>to be any other way to set them.  

>*sigh*

>In general xpvm looks pretty neat.  There are a few minor little pains
>(color coding is inconsistent between views, .xpvm_hosts only looks in
>home directory not in local directory first, etc...) but I think
>they'll be easy to fix in the source.

>Craig


>*** The opinions expressed are my own and do not necessarily reflect 
>*** those of any other land dwelling mammals....

>"The problem ain't what we don't know; it's what we know that just ain't so
>Either we take familiar things so much for granted that we never think about 
>how they originated, or we "know" too much about them to investigate closely."
>-----------------
>Craig F. Reese                           Email: cfreese@super.org
>Institute for Defense Analyses/
>Supercomputing Research Center
>17100 Science Dr.
>Bowie, MD  20715-4300

Here is a small patch that helps on passing parameters like dx, ex, etc
in the .xpvm_hosts file. Sorry the patch doesn't work for lines starting
with *. 

Note that this patch should be applied against the original (1.0) version
of xpvm. But shouldn't be hard to find the correct place in the 1.01 version
either. (I just didn't have time to download the new version yet.)

Laci Ladanyi
ladanyi@cs.cornell.edu

----------------------------cut here------------------------------------
*** util.c	Fri Jun 17 13:45:51 1994
--- util.c.new	Fri Jun 17 13:50:50 1994
***************
*** 339,346 ****
  
  	if ( fp != NULL )
  	{
! 		while ( fscanf( fp, "%s", hostline ) == 1 )
  		{
  			if ( hostline[0] != '#' && hostline[0] != '*' )
  			{
  				if ( hostline[0] == '&' )
--- 339,348 ----
  
  	if ( fp != NULL )
  	{
! 		while ( fgets( hostline, 1024, fp ) != NULL )
  		{
+ 		        if ( hostline[strlen(hostline)-1] == '\n' )
+ 			        hostline[strlen(hostline)-1] = 0;
  			if ( hostline[0] != '#' && hostline[0] != '*' )
  			{
  				if ( hostline[0] == '&' )
***************
*** 392,399 ****
  					free( tmp_alias );
  			}
  
! 			/* Clear off rest of line */
  			while ( getc( fp ) != '\n' );
  		}
  
  		fclose( fp );
--- 394,402 ----
  					free( tmp_alias );
  			}
  
! 			/* Clear off rest of line 
  			while ( getc( fp ) != '\n' );
+ 			*/
  		}
  
  		fclose( fp );
***************
*** 1093,1102 ****
  
  	ptr = name;
  
! 	while ( *ptr != NULL && *ptr != '.' )
  		ptr++;
  
! 	if ( *ptr == '.' )
  	{
  		c = *ptr;
  
--- 1096,1105 ----
  
  	ptr = name;
  
! 	while ( *ptr != NULL && *ptr != '.' && *ptr !=' ')
  		ptr++;
  
! 	if ( *ptr == '.' || *ptr == ' ')
  	{
  		c = *ptr;
  

-- 
----------------------------------------------------------------------
| Laci Ladanyi           | God made one mistake when he created man: |
| ladanyi@cs.cornell.edu |     He wrote self-modifying code ...      |
----------------------------------------------------------------------

