Skip to content

Commit 2d7348b

Browse files
committed
Get the logic right!
1 parent 35ae73a commit 2d7348b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

SpiNNaker-front-end/src/main/java/uk/ac/manchester/spinnaker/front_end/download/DataGatherer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ private void fastDownload(List<WorkItems> work,
308308
* same way to get the data in the DB in the right order.
309309
*/
310310
final ByteBuffer data;
311-
if (downloader != null) {
311+
if (job == null) {
312312
data = downloader.doDownload(
313313
item.monitor, region.startAddress, region.size);
314314
} else {

SpiNNaker-front-end/src/main/java/uk/ac/manchester/spinnaker/front_end/dse/FastExecuteDataSpecification.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,21 @@ private void loadBoardData(Gather gather, List<RegionInfo> regionsToWrite)
194194
InterruptedException {
195195
FastDataIn fastDataIn = null;
196196
var job = getJob();
197-
if (job != null) {
197+
if (job == null) {
198198
fastDataIn = new FastDataIn(gather.asCoreLocation(),
199199
gather.getIptag());
200200
}
201201

202202
for (var info : regionsToWrite) {
203203
var core = getBoardLocalDestination(info.core, gather);
204-
if (fastDataIn != null) {
204+
if (job == null) {
205205
fastDataIn.fastWrite(core, info.pointer, info.content);
206206
} else {
207+
log.info("Starting write of {} bytes to {}",
208+
info.content.remaining(), gather.asCoreLocation());
207209
job.fastWriteData(gather.asCoreLocation(), gather.getIptag(),
208210
core, info.pointer, info.content);
211+
log.info("Completed write to {}", gather.asCoreLocation());
209212
}
210213
}
211214
if (fastDataIn != null) {

0 commit comments

Comments
 (0)