MODULE firstone; (*--------------------------------------------------------- File name: firstone.pm Author: Mihaela Malita Date: 5/18/05 Problem: This program defines the a parallel configuration similar to the one in the Connex Machine. * It defines a chain, of N Processors (PEs) * Each processor has two connections, left and right * Processors start from 1 to N * Assume CNX has 1024 processors (cells) Example of Compilation: >p3 firstone.pm OR >p3 firstone OUTPUT: a.exe AND firstone.c Then >a OR >p3c firstone OR >p3c firstone.pm OUTPUT: firstone.c Then Compile with a C compiler (preferably gcc) Cycles: None *) (*---------------------------------------------------------- CONFIGURATION ----------------------------------------------------------*) CONST MAXCELLS=1024; (* MAXCELLS cells in one line *) CONFIGURATION chain[0..(MAXCELLS - 1)]; CONNECTION left: chain [i] -> chain[(i-1) MOD MAXCELLS]; right: chain[i] -> chain[(i+1) MOD MAXCELLS]; (*---------------------------------------------------------- MAIN ----------------------------------------------------------*) BEGIN (* do nothing *) END firstone.