Single Remote Service Request

Files:

Written by:

Nicholas T. Karonis

High-Performance Computing Laboratory
Department of Computer Science
Northern Illinois University
DeKalb, IL

February 1997

Description:

This program contains the *minimum* amount of code required to send a message from one process to another.

This program requires a single command line argument, an integer. It places that integer into a Nexus buffer and sends it to an awaiting process. Sending a message is called initiating a "remote service request" (rsr). An rsr invokes a specified function (called a handler routine, or simply handler) on the receiving process. In this program, the rsr instructs the receiving process to execute the function rcv_handler(), which is a routine that is found in this file.

The receiving process extracts the integer from the buffer and writes that integer to an output file (single_rsr.output).

Running this program requires one integer command line argument and exactly one other process.

To make this program:

Edit Makefile and change NEXUS_DIR to the name of the directory where you installed Nexus. This will be the directory you specified with the --prefix= switch when configuring Nexus. It is the directory that gets populated when you 'make install' Nexus.

make single_rsr

To run this program:

single_rsr 123 -nx -n 1

This will start the master and the slave on your current machine.

This program uses nexus_printf() which sends everything to stdout, so executing the program in this manner will likely display all output (including slave output) to your screen.

It will send the integer "123".

Output:

olympus#1:c0:t0:p13691: Slave received 123

Instructional Goals: