The GridPlugin Class

This method allows the calling component (OSCommand, Simcode, or Abaqus) to utilize the grid job’s output streams, if any. If this method is not implemented, the output streams are not accessible by the calling component and are discarded.

If you have a mechanism to connect the standard input, output, and error streams from the grid job, you can implement the following method.

public int submitJobAndWait(
   String[] cmd,
   InputStream cmdIn,
   OutputStream cmdOut,
   OutputStream cmdErr,
   String[] inFiles,
   String[] outFiles,
      File localWorkingDir,
   Log log
) throws RtGridException;

The arguments used by this method are the same as those for the previous method, with the addition of the following:

  • InputStream cmdIn. The input stream associated with the process’s stdin. Most codes will not currently utilize this stream, and an empty stream is typically passed in from the calling component. This argument is primarily for future expansion. This method allows this argument to be passed in as null and still run without errors, meaning that no stdin stream is provided by the caller.

  • OutputStream cmdOut. The output stream associated with the grid job’s stdout. This method allows this argument to be passed in as null and still run without errors, meaning that the grid job’s stdout should be discarded.

  • OutputStream cmdErr. The output stream associated with the grid job’s stderr. This method allows this argument to be passed in as null and still run without errors, meaning that the grid job’s stderr should be discarded.

If you choose to implement this method, a suggested approach is to have the first method implemented as follows:

public int submitJobAndWait(String[] cmd, String[] inFiles, 
String[] outFiles, File localWorkingDir, Log log) throws 
RtGridException {
   return submitJobAndWait(cmd, null, null, null, inFiles, 
   outFiles,
   localWorkingDir, log);
}