T3D Programming assignment

Write a program on the T3D that will compare the time cost of a PVM message and a shared memory wait. Use the shared memory library for the T3D. Here is the postscript for the SHMEM User's Guide for C .

Send a report describing your results to adamb@cs.cmu.edu by class time on Friday, December 9, 1994. We will discuss the results in class on Friday.

Run the program on the T3D only, not the C90 and the T3D. Use the shmem_put() and shmem_wait() calls to time the shared memory time. Use pvm_send() and pvm_recv() to time the message passing. Compare the times for a sending a single long and for writing a single long to the remote PE.

Note for the shared memory put you should declare the value to be static. This will assure that it exists at the same local memory location on both the local and remote processors.

If you want to get fancy try comparing the times for larger transfers and draw a graph of the times for various sizes.

Hints

You will need to compile your program on mario.psc.edu. Note that AFS is very slow on mario. There is a special tmp dir setup each time you login to mario. Copy your working files into $TMP and work there. When you are finished copy your files back to AFS.

The call pvm_get_PE(int tid) will return the PE number for given task id. These PE numbers are 0 to MPP_NPES, where MPP_NPES is the environment variable you set to tell the system how many processors you would like. This is useful for things like "if my PE is zero then ..".

The clock on the T3D is _rtc() Note that the clocks are not synchronized on the different processors.