Class FastExecuteDataSpecification
java.lang.Object
uk.ac.manchester.spinnaker.front_end.BoardLocalSupport
uk.ac.manchester.spinnaker.front_end.dse.ExecuteDataSpecification
uk.ac.manchester.spinnaker.front_end.dse.FastExecuteDataSpecification
- All Implemented Interfaces:
AutoCloseable
public class FastExecuteDataSpecification extends ExecuteDataSpecification
Implementation of the Data Specification Executor that uses the Fast Data In
protocol to upload the results to a SpiNNaker machine.
- Author:
- Donal Fellows, Alan Stokes
-
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 FastExecuteDataSpecification(TransceiverInterface txrx, Machine machine, List<Gather> gatherers, File reportDir, DSEDatabaseEngine db)
Create an instance of this class. -
Method Summary
Modifier and Type Method Description protected void
buildMaps(List<Gather> gatherers)
Construct the internal mappings for gatherers and monitors.void
loadCores()
Execute all application data specifications that a particular connection knows about, storing back in the database the information collected about those executions.void
writeReport(HasChipLocation chip, long timeDiff, int size, MemoryLocation baseAddress, Object missingNumbers)
Writes (part of) the report describing what data transfer rates were achieved.Methods inherited from class uk.ac.manchester.spinnaker.front_end.dse.ExecuteDataSpecification
close, processTasksInParallel
-
Constructor Details
-
FastExecuteDataSpecification
@MustBeClosed public FastExecuteDataSpecification(TransceiverInterface txrx, Machine machine, List<Gather> gatherers, File reportDir, DSEDatabaseEngine db) throws IOException, ProcessException, InterruptedException, StorageException, URISyntaxExceptionCreate an instance of this class.- Parameters:
txrx
- The transceiver for talking to the SpiNNaker machine.machine
- The SpiNNaker machine description.gatherers
- The description of where the gatherers and monitors are.reportDir
- Where to write reports, ornull
if no reports are to be written.db
- The DSE Database.- Throws:
IOException
- If IO goes wrong.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If communications are interrupted.URISyntaxException
- If the proxy URI is provided but not valid.StorageException
- If there is an error reading the database.IllegalStateException
- If something really strange occurs with talking to the BMP; this constructor should not be doing that!
-
-
Method Details
-
buildMaps
protected void buildMaps(List<Gather> gatherers) throws IOException, ProcessException, InterruptedExceptionConstruct the internal mappings for gatherers and monitors.- Parameters:
gatherers
- The descriptions of whether the gatherers are located.- Throws:
IOException
- If IDs can't be read from the machine for network reasons.ProcessException
- If IDs can't be read from the machine for machine reasons.InterruptedException
- If we are interrupted.
-
loadCores
public void loadCores() throws StorageException, IOException, ProcessException, InterruptedExceptionExecute all application data specifications that a particular connection knows about, storing back in the database the information collected about those executions. Data is transferred using the Fast Data In protocol.Cannot load data for system cores; those are used by the implementation of this protocol.
- Throws:
StorageException
- If the database can't be talked to.IOException
- If the transceiver can't talk to its sockets.ProcessException
- If SpiNNaker rejects a message.InterruptedException
- If communications are interrupted.IllegalStateException
- If an unexpected exception occurs in any of the parallel tasks.
-
writeReport
public void writeReport(HasChipLocation chip, long timeDiff, int size, MemoryLocation baseAddress, Object missingNumbers) throws IOExceptionWrites (part of) the report describing what data transfer rates were achieved.- Parameters:
chip
- Which chip was the data bound for?timeDiff
- How long did the transfer take, in nanoseconds.size
- How many bytes were transferred?baseAddress
- Where were the bytes written to?missingNumbers
- What were the missing sequence numbers at each stage.- Throws:
IOException
- If IO fails.
-