[comp.sys.transputer] Questions about 3L's Parallel C.

peder%hsr.uninett@NAC.NO (Peder Pedersen) (08/21/89)

I have problems using 3L's Parallel C on a MicroWay Quadputer.

I have made a lot of Cellular Automata's on a PC-AT using TURBO- and
Microsoft-C. Now I am porting this code to the transputers.
(There are four transputeres on the Quadputer.) I tried the same way
as the Mandelbrot-demo (i.e. using treads).

master task:
send()     : split up the array in packets
receive() : collect the pactets and put them back to the array
main()     : set up pointers to the proper arrays,
            send() reads from array1, receive() puts into array2,
            (and at next generation we switch arrays (mat's))
            write results for every generation to disk.

worker task :
reads the input-packet, checks for collision, do the transport,
and put the result into the output-packet.


The program runs, but it produce wrong results, and sometimes it even hangs.
Using printf() as debugging-tool (it is not *very* god) it seems to me that
I have a problem with semaphors. sema_wait() doesn't wait ???

(The Mandelbrot-demo works fine.)
The algorithms I use, work properly with ordinary C on the PC-AT.

Maybe some of you could give me some hints ?


Peder Pedersen.
----------------------------------------------------------------------------
-    Peder Pedersen, Rogaland University Center, Stavanger, NORWAY.        -
-    internet: peder%hsr.uninett@tor.nta.no                                -
-    bitnet: peder%hsr.uninett@norunix.bitnet (UNSTABLE)                   -
-                                                                          -
-    Here is room for a joke (Let's hope it's gonna be a good one).        -
----------------------------------------------------------------------------