next up previous
Next: Server side Up: int pvm_init_worker_class(char *farm_name Previous: int pvm_init_worker_class(char *farm_name

Client side

  1. Get the tid of the worker (pvm_mytid )
  2. Search for the server task by looking at the list of tasks and get the tid of the server. If there's no server, then return ERROR. (check the global variable containing the server task id).
  3. Send a message to the server. It should contain opcode INIT_WORKER_CLASS, farm name, and worker class name.
  4. Wait for the reply from the server. Get the status ERROR, or wcid and store it in a global variable to be used later.
  5. Get and store the farmer name and the farmer task id in a global variable which could be used later.

  6. return OK


Sameer Shende