Class IobufRetriever
java.lang.Object
uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
uk.ac.manchester.spinnaker.front_end.iobuf.IobufRetriever
- All Implemented Interfaces:
AutoCloseable
public class IobufRetriever extends BoardLocalSupport implements AutoCloseable
Retrieves and processes IOBUFs.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested classes/interfaces inherited from class uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
BoardLocalSupport.BoardLocal
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IobufRetriever(TransceiverInterface transceiver, Machine machine, int parallelSize)
Create a IOBUF retriever. -
Method Summary
Modifier and Type Method Description void
close()
NotableMessages
retrieveIobufContents(IobufRequest request, File provenanceDir)
Retrieve and translate some IOBUFs.NotableMessages
retrieveIobufContents(CoreSubsets cores, File binaryFile, File provenanceDir)
Retrieve and translate some IOBUFs.
-
Constructor Details
-
IobufRetriever
@MustBeClosed public IobufRetriever(TransceiverInterface transceiver, Machine machine, int parallelSize)Create a IOBUF retriever.- Parameters:
transceiver
- How to talk to the machine.machine
- Description of the machine being talked to.parallelSize
- How many tasks to do at once (at most).
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
InterruptedException
-
retrieveIobufContents
public NotableMessages retrieveIobufContents(IobufRequest request, File provenanceDir) throws IOException, ProcessException, InterruptedExceptionRetrieve and translate some IOBUFs.- Parameters:
request
- Mapping from the full paths to the APLX files executing, to the cores on which those executables are running and which are to have their IOBUFs extracted. There must be a.dict
file as a sibling to each APLX file.provenanceDir
- The directory in which provenance data is written.- Returns:
- The errors and warnings that have been detected. The order of the messages is not determined.
- Throws:
IOException
- If network IO fails or the mapping dictionary is absent.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If communications are interrupted.RuntimeException
- If an unexpected exception happens.
-
retrieveIobufContents
public NotableMessages retrieveIobufContents(CoreSubsets cores, File binaryFile, File provenanceDir) throws IOException, ProcessException, InterruptedExceptionRetrieve and translate some IOBUFs.- Parameters:
cores
- The cores from which the IOBUFs are to be extracted. They must be running the executable contained inbinaryFile
or the buffers will contain the wrong information.binaryFile
- The APLX file being executed. There must be a.dict
file as a sibling to it.provenanceDir
- The directory in which provenance data is written.- Returns:
- The errors and warnings that have been detected. The order of the messages is not determined.
- Throws:
IOException
- If network IO fails or the mapping dictionary is absent.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If communications are interrupted.RuntimeException
- If an unexpected exception happens.
-