🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.mail-lists.parallel
Article #234

I need help with C* Paris calls on CM-2

#234
From: Kevin Kreeger
Date: Wed, 26 Aug 1992 19:33
83 lines
2525 bytes
I just started using a CM-2 to do some analysis of 2-d routing
when using a mesh topology as compared to a hypercube topology.
I figured the Paris calls to routing would be the fairest way to
assure the routing was going along the paths I choose. However
I have not been able to get the CM_send_to_news_1L() call to
work properly. The following is a test piece of code I wrote to
try to get it to work...


#include <stdio.h>
#include <cm/paris.h>

#define SIZE   4

shape [512][16]mesh;

char:mesh top_ptr;

main()
{
  [0][0]top_ptr=1;
  [1][1]top_ptr=2;
  [2][2]top_ptr=3;
  [3][3]top_ptr=4;

  print_pe_matrix(); 

  with(mesh)
    where ((pcoord(0) < SIZE) && (pcoord(1) < SIZE))
      myroute();

  print_pe_matrix();
}

print_pe_matrix()
{
  int r,c;

  for(r=0;r<SIZE;r++)
    {
    for(c=0;c<SIZE;c++)
        {
        printf("%2d ",[r][c]top_ptr);
        }
    printf("\n");
    }
  printf("\n");
}

myroute()
{
      CM_send_to_news_1L(&top_ptr,&top_ptr,0,0,sizeof(top_ptr));
}




The problem I seem to be having is with the fourth argument sent to the
subroutine. The manpages says it should be ":upward" or ":downward". But,
they seem to be written for the Lisp compiler. I assumed these were
#DEFINE's so I tried UPWARD, upward, and :upward and kept getting
compile errors. I then assumed that these were probably constants for
0 and 1. Well that let it compile, but I then started getting weird
results were the data was not routing. To me It should shift the 
whole array to the right (or left). But it was only shifting some 
pe's and then it would corrupt others.

Does anyone out there use this call and what do I need to do to
get it to work properly? I know that I could get the same results
with the c* line


	top_ptr = [.][.-1]top_ptr;


But then I'm not assured of the path. And also when I do the
hypercube, it is not scalable. Every time I would increase the
saize I would have to add more "left indexes" to every place
in the code. I'm fairly sure this is not how it is meant to be done.

Thanks for anything you can do to help me

Kevo.
Technical Details
Message-ID: <314376@nttlab.ntt.JP>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-snd-ss2!akiu!hakata!kyu-cs!lab!nttlab!daemon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-snd-ss2!akiu!hakata!kyu-cs!lab!nttlab!daemon
From: kevin-kreeger@orl.mmc.com (Kevin Kreeger)
Newsgroups: fj.mail-lists.parallel
Subject: I need help with C* Paris calls on CM-2
Message-ID: <314376@nttlab.ntt.JP>
Date: 26 Aug 92 19:33:14 GMT
Sender: news@nttlab.ntt.JP
Distribution: fj
Lines: 83
Approved: news@nttlab.ntt