home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.parallel
- Path: sparky!uunet!destroyer!gatech!hubcap!fpst
- From: kevin-kreeger@orl.mmc.com (Kevin Kreeger)
- Subject: I need help with C* Paris calls on CM-2
- Message-ID: <1992Aug26.193225.20244@hubcap.clemson.edu>
- Apparently-To: comp-parallel@uunet.uu.net
- Keywords: Connection Machine C* Paris
- Sender: kevink@orl.mmc.com (Kevin Kreeger)
- Organization: Martin Marietta
- Date: Wed, 26 Aug 1992 18:20:16 GMT
- Approved: parallel@hubcap.clemson.edu
- Lines: 87
-
- 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.
-
-
-
-
-