#!/usr/bin/env slsh

import ("pvm");

define show_config()
{
   variable s = pvm_config ();
   variable num = length (s.hi_name);
   variable i;
   () = fprintf (stdout, "%d hosts, %d data format(s)\n", num, s.narch);

   variable fmt = "%25s  0x%06X %10s %8d 0x%08X\n";
   
   () = fprintf (stdout, "%21sHOST      DTID       ARCH    SPEED       DSIG\n", " ");

   _for (0, length (s.hi_name)-1, 1)
     {
	i = ();
	() = fprintf (stdout, fmt,
		  s.hi_name[i], s.hi_tid[i], s.hi_arch[i], s.hi_speed[i],
		  s.hi_dsig[i]);
     }
}

show_config ();
pvm_exit ();

