Ticket #2415 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

SaveNexusProcessed: Progress reporting is terrible

Reported by: Nick Draper Owned by: Karl Palmen
Priority: major Milestone: Release 2.2
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

It jumps instantly to 30% reporting Writing Parameter Map and then waits for a long time before completing.

Change History

comment:1 Changed 9 years ago by Nick Draper

  • Owner set to Roman Tolchenov
  • Status changed from new to assigned

comment:2 Changed 9 years ago by Nick Draper

  • Owner changed from Roman Tolchenov to Peter Peterson

Pete, can one of your team handle this?

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 28 to Iteration 29

Bulk move of tickets at the end of iteration 28

comment:4 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 29 to Iteration 30

Accepted and assigned tickets moved at iteration 29 code freeze

comment:5 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 30 to Iteration 31

Bulk move of tickets to iteration 31 at the iteration 30 code freeze

comment:6 Changed 9 years ago by Peter Peterson

  • Owner changed from Peter Peterson to Anyone

comment:7 Changed 9 years ago by Anders Markvardsen

  • Owner changed from Anyone to Karl Palmen

comment:8 Changed 9 years ago by Karl Palmen

A look at the code shows it arbitrarily allocates the first 30% to Opening the file, writing the header and writing the sample and instruments and the remaing 70% to precessing events.

In all the cases I've tried, SaveNexus has been so fast that progress reporting has not mattered. I expect the cases where it has mattered each have a large number of events, which may take 99% or more of the processing time.

comment:9 Changed 9 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:10 Changed 9 years ago by Karl Palmen

Reduced Progress shown for initial part of SaveNexusProcessed to 5%

This is a quick fix for re #2415. I also rearranged code to make this figure easier to change in future or make dependent on the type of workspace or any of its easily read properties.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 5af6911e46771f47d250e33352248ddd050f592f

comment:11 Changed 9 years ago by Karl Palmen

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:12 Changed 9 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:13 Changed 9 years ago by Anders Markvardsen

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Tested by loading MERLIN data from
isis\inst$\NDXMERLIN\Instrument\data\cycle_11_4 of size about 200MB, and then right-clicking over workspace select 'Save Nexus' (which exe SaveNexusProcessed). For such files the progressing bar jump to 3% where it sits until it eventually jumps to 100% after about 30-40 sec on my pc.

Karl see if there is an easy fix for this. If not move this ticket to the next iteration.

comment:14 Changed 9 years ago by Karl Palmen

  • Milestone changed from Iteration 32 to Iteration 33

comment:15 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:16 Changed 8 years ago by Karl Palmen

I expect the problem is that the number of events to be saved is not known in advance and so progress reporting during this phase cannot be realistically organised.

comment:17 Changed 8 years ago by Karl Palmen

A look at the code shows that it does have the number of events in advance and even reports progress once per histogram. This is done within a Parallel Interrupt Region and perhaps does not work for this or perhaps for events, there is only one histogram.

comment:18 Changed 8 years ago by Karl Palmen

A run of the code with debugger when running such a Merlin file, reveals that the part after the 3% is run by NexusFileIO.cpp, which has no progress reporting whatsoever. This seems to be the cause of the bad progress reporting.

comment:19 Changed 8 years ago by Karl Palmen

  • Status changed from reopened to accepted

comment:20 Changed 8 years ago by Karl Palmen

I'll try a new constructor for NexusFileIO that takes a progess object as argument and then use it if not null.

comment:21 Changed 8 years ago by Karl Palmen

Make progress reporting dependent on type of workspace re #2415

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 14ec5a8796a5d74e8ebfd07ac43d9fb258037955

comment:22 Changed 8 years ago by Karl Palmen

Get NexusFileIO.cpp to do some of the progress reporting re #2415

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 00d85009445e5825b2cef6d2408889279e6d5458

comment:23 Changed 8 years ago by Karl Palmen

Progress reporting improved. It could be improved further in a new ticket.

comment:24 Changed 8 years ago by Karl Palmen

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:25 Changed 8 years ago by Karl Palmen

For testing, load a MERLIN file from isis\inst$\NDXMERLIN\Instrument\data\cycle_11_4 or similar of size about 200MB, and then right-clicking over workspace select 'Save Nexus' (which exe SaveNexusProcessed). The progress bar should jump a little several times.

comment:26 Changed 8 years ago by Karl Palmen

You may also wish to test an event file such as those from LETS to verify sensible progress behaviour then.

comment:27 Changed 8 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester changed from Anders Markvardsen to Wenduo Zhou

comment:28 Changed 8 years ago by Wenduo Zhou

  • Status changed from verifying to closed

comment:29 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3262

Note: See TracTickets for help on using tickets.