Let's now add our own function to the SPRINT package. This new function will be called phello()
. We will use our earlier MPI Hello World example as the basis for this. This will involve the following tasks:
Downloading the SPRINT source code.
Creating the R stub file: This enables the desired functionality to be callable from R on the Master process. It calls the interface function for this functionality.
Adding the interface function: The interface function is the C equivalent of the R stub. It is also executed on the Master process. It is responsible for broadcasting the command code for the implementation function that the Worker processes are to execute.
Adding the implementation function: Each command code has a corresponding implementation function. On receipt of the command code, this function is executed on the Worker processes. Additionally, it is also executed on the Master process.
Connecting the stub and functions: Update the relevant SPRINT...